A young woman holds her stomach while laying on couch
A young woman holds her stomach while laying on couch
A young woman holds her stomach while laying on couch

How to Get Rid of Gas Pain

Updated June 21, 2026

If you’ve ever experienced waves of sharp pain in your belly along with the feeling that your waistline is inflating like a balloon, you might be experiencing bloating and cramps due to intestinal gas. Johns Hopkins gastroenterologist  Hazel Marie Galon Veloso provides some perspective on bloating and gas cramps, including when to see a doctor.

Key Points

  • Gas pain often resolves itself naturally through burping or passing gas. 
  • Eating a high-fiber diet, staying hydrated, and avoiding gum and carbonated beverages help reduce gas pain. 
  • If gas pain happens frequently, talk to your doctor. 

Does constipation cause gas?

Yes. Anything that slows down the digestive process, such as a low-fiber diet, use of opioid medications or an anticholinergic drug can put the brakes on timely bowel function.

How can I avoid gas pain?

While burping or passing gas will reduce the immediate pain, a long-term approach for reducing bouts of gas and cramping are to:

  • Eat a diet rich in fiber.
  • Stay hydrated.
  • Exercise.
  • Avoid drinking with a straw.
  • Choose noncarbonated beverages.
  • Avoid chewing gum.

“If gas is associated with constipation, treating the constipation with medications such as polyethylene glycol may help.   However, if the gas pain, bloating, flatulence or burping persists despite the constipation improving, you should see your primary care physician/provider or a gastroenterologist because these may be from another cause.”

Gas Pain: When to See a Doctor

Veloso says to be on the lookout for abdominal pain and bloating that persists even after constipation improves.

“You may have celiac disease, small intestinal bacterial overgrowth (SIBO) or intestinal methanogen overgrowth (IMO), which can cause these symptoms and can occur with either constipation or diarrhea. You may also have irritable bowel syndrome or another problem,” she notes.

The SIBO Connection

“We see SIBO or IMO in patients who have had abdominal surgeries such as Roux-en-Y gastric bypass or conditions such as diverticulosis of the small bowel. It’s more common in people with systemic diseases such as long-standing or poorly controlled diabetes, scleroderma, lupus, Crohn’s disease or celiac disease, and in those with a lowered immune system.

“Long-term intake of narcotics or opioid medications and use of GLP-1 agonists for weight loss or diabetes, such assemaglutide (Ozempic, Wegovy),tirzepatide (Mounjaro, Zepbound),liraglutide (Victoza, Saxenda),dulaglutide (Trulicity),exenatide (Byetta, Bydureon),andlixisenatide (Adlyxin), decrease the motility of the small bowel and colon that can lead to SIBO or IMO. Use of proton pump inhibitors such as omeprazole (Prilosec), pantoprazole (Protonix), lansoprazole (Prevacid) and esomeprazole (Nexium) for a prolonged period, especially if more than six months, can lead to alteration in the microbial environment in the gut, which can lead to SIBO or IMO. Advanced age can be another risk factor,” Veloso adds.

The condition can be treated with antibiotics or antimicrobial herbs and a low FODMAP diet. FODMAP stands for “fermentable oligosaccharides, disaccharides, monosaccharides and polyols.”

Food Intolerance

When it comes to recurring bouts of intestinal gas, food sensitivities such as lactose intolerance are another common culprit. Veloso says some food sensitivities are present at birth (primary); others can develop later on (secondary).

“If you get repeated episodes of gas and cramping, try to notice foods that tend to set it off,” Veloso advises.

Once you identify the food(s) that cause problems, check in with your doctor, who can help determine if you’re reacting to lactose, fructose, gluten or another ingredient. Modifying your diet, taking enzyme pills or other treatments may bring relief.

Lactose intolerance can be secondary to SIBO or IMO. The overgrowth of bacteria or archaea in the small intestine can cause inflammation and damage the microvilli (the brush border). Because this is where enzymes like lactase (which breaks down lactose) are produced, the loss of these cells leads to a temporary, secondary enzyme deficiency.

Many people who believe they have a “gluten intolerance,” if they don’t have celiac disease, may be reacting to fructans, which are present in certain gluten-containing grains like wheat, barley and rye. Those who have SIBO and/or IMO have symptoms when eating food with fructans because the microbes that are overgrown in their small bowel ferment the fructans immediately and produce substantial amounts of hydrogen and methane gas.

Gynecologic Issues

For women, if your doctor rules out a digestive problem, a visit to the gynecologist may be in order. Bloating and abdominal pain can mean something is going on with your uterus, ovaries or fallopian tubes. 

There are many causes of bloating and gas pain, and most have treatments that can help you get relief. Any abdominal pain that is severe or interferes with your life is a good reason to go with your gut and see a doctor.

Medically reviewed by Hazel Veloso, M.D.

Request an Appointment

Find a Doctor
Find a Doctor