Is you cat prone to hair balls? It could be that. That can cause dry heaves because they can get stuck.
frequent bathing?
Mine won't eat for an hour after expelling one. And she will often turn away just before one is coming up.
I would have him checked by the vet to make sure. IF it's something else, it could lead to big problems
IF it is hairball related, don't let them sell you laxatone.... very high in sugar
either get some coconut oil, or butter or just plain old Vaseline ( dab on your finger and put it on his palate so he has to swallow it)