Rabbits reach “puberty” when they are between 4-6 months old. This is when their hormones kick in, they tend to become more territorial which leads to marking. Sterilizing not only prevents unwanted pregnancies and decreases their chances of reproductive cancers, but also calms them, improves their behavior, and increases the chances of them using a litter box. There are no behavioral changes in sterilizing a cavy.
Rabbits and cavies like to do their business while they eat! That means having a litter box big enough to contain all their hay, still allow for a clean space to defecate, and even large enough to take a snooze in, is ideal!
With any training, it takes time! But sometimes when rabbits are pooping outside their box, this can be due to feeling territorial. It is a rabbit's way of marking their territory. We suggest scooping up their poops and placing it inside their box so they can see where it goes. But sometimes, this behavior does not completely stop.
Cavies cannot control their bowel/bladder and likely will never be 100% box trained but offering a box does help contain the mess.