Its very likely he has a urinary tract problem as they are common in male cats. He might have swallowed string,plastic or some other non food item or be constipated too.
In any case he needs to see a vet.
If he has a blockage of either urine or stool they can be life threatening.
You can read about lower urinary tract disease here
http://www.marvistavet.com/html/body_feline_lower_urinary_tract_dis.html
The more serious blockage here
http://marvistavet.com/html/urinary_blockage.html
and megacolon here
http://www.marvistavet.com/html/constipation_and_megacolon.html
I'd get him in to see the vet as soon as you can.
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!