If this is the first time it's happened, you may want to go to the vet. It could be the food, it could be something else. There are cat laxatives also but I'm not sure this site carries them
When my cat was constipated a little bit of olive oil helped pass it through.
Vet attention will be best
First, take him to the vet immediately.
Thanks! Your answer is awaiting moderation.