Thank you for the query.
Such symptom can be a constipation
or bowels obstruction. If his abdomen gets bloated and he has some cramping with gas and stool blockage, bowels obstruction can be the reason.
Constipation can be caused by bad diet, chronic bacterial infection or hypothyroidism
I suggest you to take him to the doctor. Abdominal X-ray
and blood work should be done. If no obstruction, than you can try stool softeners. Diet should be modified (increase fiber rich products) and start probiotic
intake. Stool tests are also necessary.
Hope this will help.