Hi I actually used to get something like this when I was younger. The pain was just as you described. I never actually found out what it was that was causing the pain but as you said I think is was trapped gas. The only way I found that got rid of the pain was to lay down and totally relax and take long deep breaths. Im not sure if this will help but it worked everytime for me. The pain was gone within 1-2 mins of doing so.
Axebro, this could reflect the possibility of gallbladder issues. It's hard to know without knowing what specific tests were done, but GB issues can bring even the strongest person to their knees.
The tests that usually done to check the GB are an ultrasound and a HIDA scan with CCK injection. But no test is 100% perfect, so if he had those done make sure you check to see what the 'readings' were - it could be important. In addition, he should have both liver and pancreatic enzyme levels check within 24 hours of an especially bad attack of pain. If it's done at other times, the levels could come back registering as 'normal' unfortunately.
In the meantime, he may want to adopt and stay on a low fat diet. If it is a gallbladder issue it may help. Check to see whether other members in your family have GB issues, too.
If his stool is grayish or whitish when he's have bowel problems that could also indicate that the problem could be tied in with the GB and with biliary problems.