Does he use a litter tray indoors? If so I would keep him in for a day or something and see whether he uses the toilet a lot, if so he'll need a trip to the vets, could have an infection or something. If everything is normal from that point of view then at least you can rule that out.