Skip to main content
Read about

Stomach Spasms

GERD is the main cause of stomach spasms, but they can also be caused by peptic ulcers, celiac disease, gluten intolerance, bacterial or viral gastroenteritis, or food poisoning. Treatments include GERD medications, avoiding certain foods, taking antacids, or surgery.
Tooltip Icon.
Medically reviewed by
Last updated November 13, 2024

Stomach spasms quiz

Take a quiz to find out if you have stomach spasms.

Stomach spasms occur in your mid to upper abdomen. The spasms can feel like twitching, flutters, or sharp pains. You may also have other gastrointestinal (GI) symptoms, such as diarrhea and vomiting.

Most causes of abdominal spasms aren’t emergencies. For example, you may have eaten a meal that didn’t agree with you, or you might experience stomach twitching and stomach flutters when you’re anxious or have heartburn.

But some causes of stomach spasms are serious and need to be treated as soon as possible. These include acute pancreatitis and gallbladder infections.

Depending on the cause, treatments range from taking antacid medication to needing surgery. Because many mild conditions that cause abdominal pain share common symptoms with more severe diseases, it’s important to see your doctor to get the correct diagnosis.

Most common symptoms

Stomach spasms occur in the upper middle region of the abdomen. They can be sudden and sharp, or chronic and cramping, and can occur with or without eating food.

Dr. Rx

It is important to know “red flag” symptoms that occur with the pain, such as blood in stool, weight loss, and having fevers/chills. If you are experiencing any of these symptoms along with the stomach spasms, you must be seen by a doctor instead of attempting home remedies. —Dr. Jonathan Xia

Main symptoms

  • Pain in your mid to upper abdomen, sharp and sudden or that comes and goes
  • Pain that radiates to your back or shoulder
  • Pain that worsens when you eat greasy and spicy food and food high in fat
  • Cramping
  • Stomach twitching
  • Stomach flutters
  • Burning sensation in your stomach and throat
  • Bloating

Other symptoms you may have

  • Fever
  • Chills
  • Nausea
  • Vomiting
  • Diarrhea
  • Feeling like food is getting stuck in your throat when you eat
  • Blood in stool
  • Black stools
  • Yellowing of the eyes and skin
  • Shortness of breath

Causes

The most common cause of spasms is GERD, more commonly known as heartburn. Other causes include:

Sometimes the cause of stomach spasms can’t be identified. When that happens, you’re diagnosed with functional dyspepsia. People with functional dyspepsia usually experience pain that feels like stomach twitching or stomach flutters. The condition is more common in women and people with a history of anxiety or depression.

Pro Tip

The most common causes of stomach spasms are benign. However, it can still cause a severe amount of discomfort and interruption of daily life. Many of the symptoms can be fixed with over-the-counter antacids or avoiding food triggers. —Dr. Xia

Stomach spasms when lying down

Sometimes abdominal spasms are more intense when you lie down. This commonly affects people with heartburn. Symptoms such as burning and cramping in the middle abdomen, regurgitation, and even coughing can wake you up in the middle of the night. It usually occurs when you’ve eaten a large dinner or ate late at night.

Acute pancreatitis can also cause pain that worsens when you lie down. It may improve when you sit up or lean forward.

Sometimes the pain caused by gallstones or gallbladder disease feels worse when you lie down. This usually happens after you eat a big meal.

Risk factors

Common risk factors for stomach spasms include:

  • Obesity
  • Hiatal hernia
  • Eating large meals
  • Eating late at night
  • Eating fatty or greasy foods
  • Drinking alcohol or coffee
  • Taking medications such as naproxen or ibuprofen

Certain health conditions can also cause stomach spasms, such as:

Treatment

Medication

If you’re diagnosed with heartburn or peptic ulcers, the most common treatments are antacids (such as Tums) or medications that decrease stomach acid production such as H2-blockers or proton-pump inhibitors.

If your doctor suspects an infection in your gallbladder, liver, or biliary ducts, you’ll likely need to be treated with IV antibiotics. People diagnosed with acute pancreatitis should also be hospitalized for several days to receive IV fluids and possibly IV antibiotics to ease the inflammation.

For those diagnosed with functional dyspepsia, antispasmodic medications such as dicycloverine and hyoscyamine are recommended. If you require long-term treatment, your doctor may prescribe tricyclic antidepressants to control the spasms.

Procedures

If you have gallbladder disease, you may need to have surgery to remove your gallbladder.

Lifestyle changes

Stomach spasms caused by celiac disease or a gluten intolerance can be controlled by avoiding foods that contain gluten, such as bread, pasta, and cereal.

Prevention

Some conditions that cause stomach spasms can’t be prevented. But if you have heartburn, you can limit symptoms by:

  • Losing weight
  • Quitting smoking
  • Avoiding foods that are greasy, spicy, and high in fat
  • Limiting alcohol and coffee
  • Avoiding eating large meals late at night or near bedtime

Pro Tip

Sometimes, pain in that area can be due to organs not in the abdomen, so a thorough medical and surgical history is also important. —Dr. Xia

Next steps

See your doctor if your stomach spasms began gradually, are tolerable, and have lasted for a long time. You should also see your doctor if the pain is very mild and seems to be triggered by certain foods, drinks, or medications. They can help you identify what food and drinks you should avoid and suggest different medications that might be easier on your stomach.

Go to the ER if stomach spasms occur suddenly and are intolerable (even after taking over-the-counter medications like Pepto-Bismol or Imodium). Other concerning symptoms with intense stomach spasms include blood in your stool, fevers, chills, and yellowing of your skin and eyes.

Share your story
Once your story receives approval from our editors, it will exist on Buoy as a helpful resource for others who may experience something similar.
The stories shared below are not written by Buoy employees. Buoy does not endorse any of the information in these stories. Whenever you have questions or concerns about a medical condition, you should always contact your doctor or a healthcare provider.
Dr. Le obtained his MD from Harvard Medical School and his BA from Harvard College. Before Buoy, his research focused on glioblastoma, a deadly form of brain cancer. Outside of work, Dr. Le enjoys cooking and struggling to run up-and-down the floor in an adult basketball league.

Was this article helpful?

129 people found this helpful
Tooltip Icon.
Read this next
Slide 1 of 4