Have Cat Questions? Ask a Cat Vet Online.
The first step is taking to a vet. We can hope that he has a urinary infection/crystals and he is "showing" you. Many times if we immediately start treating we can stop the problem before it becomes habit forming.
If that checks out clean...then you may want to discuss other options with your vet at that time.