Hi thanks for query
Since the pain is getting resolved by urinating it is urinary tract
problem. He is having pain and bloating
due to full bladder.
This. Can occur if there is any obstruction to flow in urinary tract.this could be due to many reasons.
Get an abdominal ultrasound
and urine. Examination. Done
I think this will help