My husband has irritable bowel syndrome and he has pains like that. We try to prevent - by using gasx, beano, and lots of fiber rich foods. Plus the products on the market that say to take before eating. Prilosec or whatever the generic is. He does fibricil and metamucil and uses mirolax every now and then. If he doesnt and ends up inpain than we go the prescription medicine his dr gives him.