For example, some cats may develop litter box aversion after a bout of constipation or a urinary tract infection. (cat-lovers-only.com)
There are also other reasons for litter box aversion such as poor location of the box, wrong size / type of box, stress in the environment, and so on. (catbehaviorassociates.com)
Therefore, anything that causes dehydration or your cat to hold her stool in longer, such as litter box aversion or your cousin's week long visit, can lead to constipation. (cat-lovers-only.com)