I've seen many times on the show My Cat From Hell where a cat that is freaked out, stressed, or otherwise insecure about something will hide in one of those covered litterboxes because it is like a safe little cave. If the girl hurt him trying to pick him up (even if it's nothing serious) he might be hiding.
Also, some cats will go chill in the litterbox if they feel like they might have to "go" soon, even if you don't see them straining or trying, they might be hanging out there just in case. My cat did this a few times when he had the runs from being on an antibiotic. Imagine that feeling you get in your guts when you're about to have a #2 potty emergency...I'm pretty sure he felt that and went running but then when it didn't happen right away, he settled in to wait. That sort of scenario. A cat with urinary problems might feel the pressing urge to pee even if there's not much of anything to come out, as in a UTI. So he might hang out there just in case.
Those are the reasons I think are likely in your case, with an established older cat.
Cats from shelters and rescues that are in little cages wind up with this behavior for other reasons and it can carry over into the home environment for a while, but you didn't indicate that he was recently adopted so ruling that one out.
Vet visit for bloodwork is a great idea, and you should work on his diet...don't necessarily just listen to the vet. Go to
www.catinfo.org and read up when you have time...specifically about the overweight cat and the blocked boy Opie. Vets don't always know or tell you the right thing about cat nutrition.
Best wishes for you and your cat!