Toileting inside or in the wrong area can occur at any age. It may be for behavioural reasons, such as anxiety, or for medical reasons like a bladder infection, arthritis, or even Alzheimer’s. Whatever the cause, it's worth talking to your vet, who can advise on behavioural issues and run a urine test to detect any medical reasons.