What Medicine Can I Take to Alleviate Stomach Pain?


Stomach pain is a common issue that many people experience. Whether the discomfort is because of something you ate, stress, or a chronic condition, various medications are available over the counter (OTC) and by prescription to help alleviate it. 

These can range from OTC antidiarrheals and antacids to prescription laxatives and proton pump inhibitors (PPIs), depending on your symptoms.

Getty Images / LaylaBird


Over-the-Counter Stomach Medication

For Constipation

For constipation, various types of laxatives are available. Options include:

  • Bulk-forming laxatives add fiber to the stool, helping it pull more water into the intestine to provide bulkier, softer stools. Examples are Metamucil (psyllium) and Citrucel (methylcellulose).
  • Osmotic laxatives, such as MiraLax (polyethylene glycol 3350), work by increasing fluid within the intestines to soften stools and promote faster movement of the stool through the colon.
  • Stimulant laxatives stimulate the large intestine to contract, leading to bowel movements. Common ones include Dulcolax (bisacodyl) pills or suppositories and Senokot (senna).
  • Stool softeners like Colace (docusate) pull more water into the stool, making it softer and less difficult to pass.
  • Other laxative options are Milk of Magnesia (magnesium hydroxide) and lubricant laxatives like glycerin and mineral oil.

For Gas

Gas relief can be achieved through simethicone-containing products like Gas-X, Phazyme, and Mylanta, which break up gas bubbles in the gut.

Digestive aid products are also an option for aiding in the digestion of specific food components. Examples are Beano (alpha-galactosidase) and Lactaid (lactase), which may be helpful if you feel bloated after consuming dairy products.

For Heartburn

For upper abdominal pain from heartburn, a wide variety of OTC medications are available. Make sure you read the product labels. Many are not intended for long-term use without consulting a healthcare provider.

The main types of OTC medications that treat heartburn include:

  • Antacids, which work to neutralize stomach acid on contact and provide quick relief. You take a dose when heartburn symptoms occur. Popular antacids are Gaviscon (alginic acid/sodium bicarbonate/aluminum hydroxide/magnesium carbonate), Mylanta (aluminum hydroxide/magnesium hydroxide), Rolaids (calcium carbonate/magnesium hydroxide), and Tums (calcium carbonate).
  • Histamine type 2 receptor antagonists (H2 blockers), which reduce stomach acid production by blocking histamine-2 receptors in the stomach. They help prevent heartburn when taken as directed. Common choices include Pepcid (famotidine), Axid (nizatidine), and Tagamet (cimetidine).
  • Proton pump inhibitors (PPIs), which block the production of stomach acid. Examples of PPIs include Nexium 24H (esomeprazole), Prevacid 24H (lansoprazole), Prilosec OTC (omeprazole), and Zegerid OTC (omeprazole/sodium bicarbonate).

For Diarrhea

For managing diarrhea, OTC anti-diarrheal options include Imodium A-D (loperamide), which slows down gut movement, and bismuth subsalicylate products (Pepto-Bismol, Kaopectate), which helps reduce intestinal inflammation. These medications can provide quick relief and help manage uncomfortable symptoms of an upset stomach.

Contact your healthcare provider if symptoms continue after two to three days of taking these medications.

For Menstrual Pain

OTC medications can also help relieve stomach pain stemming from menstrual cramps. Common options include:

  • Motrin or Advil (ibuprofen)
  • Midol Complete (acetaminophen/pyrilamine maleate/caffeine)
  • Aleve (naproxen)
  • Tylenol (acetaminophen)

Prescription Stomach Medication

In cases when OTC options aren’t effective or appropriate, prescription medications may be necessary. A healthcare provider will need to help identify what may be causing your stomach pain before prescribing medication. This may require blood work or medical tests to help determine the underlying reasons for your symptoms.

Though the lists below are not comprehensive, they provide examples of some prescription medications that target specific conditions known to cause stomach pain.

For irritable bowel syndrome with constipation (IBS-C):

  • Amitiza (lubiprostone)
  • Linzess (linaclotide)
  • Trulance (plecanatide)

For irritable bowel syndrome with diarrhea (IBS-D):

  • Lotronex (alosetron)
  • Viberzi (eluxadoline)
  • Xifaxan (rifaximin)

For chronic constipation without a known cause that lasts at least three months (CIC):

  • Amitiza
  • Linzess
  • Motegrity (prucalopride)
  • Trulance

For opioid-induced constipation (OIC), Movantik (naloxegol) can be an effective option. Other examples are Amitiza (lubiprostone) and Relistor (methylnaltrexone).

Heartburn can be a symptom of gastroesophageal reflux disease (GERD) or ulcers. To treat these types of conditions, healthcare providers often prescribe longer-term H2 blockers or PPIs. PPIs may also be prescribed alongside certain antibiotics to treat a gut infection caused by bacteria known as H. pylori.

Examples of prescription PPIs include:

  • Aciphex (rabeprazole)
  • Dexilant (dexlansoprazole)
  • Nexium (esomeprazole)
  • Prevacid (lansoprazole)
  • Prilosec (omeprazole)
  • Protonix (pantoprazole)

It’s possible that none of the medications listed here are appropriate for your situation. The type of medication prescribed will depend on the specific cause of your symptoms.

Nondrug Remedies

In addition to medications, several nondrug remedies can alleviate mild stomach pain:

  • Herbal teas, including ginger, peppermint, and chamomile, can soothe the digestive tract, reduce nausea, and ease discomfort.
  • Probiotics found in yogurt and supplements can aid digestion and help reduce bloating.
  • For constipation, drink fluids and gradually increase fiber intake from sources like bran, fruits, vegetables, nuts, and seeds to promote regular bowel movements. Establishing consistent eating habits is also important. Sitting on the toilet for about 30 minutes after eating can encourage regular bowel movements, as can regular physical activity like a daily walk.
  • For diarrhea, drinking fluids (e.g., oral rehydration solutions, water, or sports drinks) can replenish lost fluids and electrolytes. Following the BRAT diet (bananas, rice, applesauce, toast) provides bland foods that are easy to digest.
  • For gas and bloating, consider limiting foods that contain high amounts of FODMAPs, which stands for fermentable oligosaccharides, disaccharides, monosaccharides, and polyols. FODMAPs are found in certain fruits, vegetables, grains, dairy products, and processed foods. Additionally, lowering sodium intake may help reduce bloating and discomfort.
  • For menstrual cramps, heating pads can relax muscles and ease pain, while gentle massage, aromatherapy, and stretching can also offer relief.

Common Causes of Stomach Pain

Stomach pain can have numerous causes, ranging from mild and temporary to more serious conditions. Common causes include:

  • Gas and bloating: Gas and bloating can lead to sharp or cramping pains in the abdomen. It is often caused by swallowed air, certain foods, or digestive disorders.
  • Constipation: Constipation occurs when bowel movements become infrequent or hard to pass, often caused by a combination of factors such as lack of fiber, insufficient water intake, or a sedentary lifestyle. It can make your stomach hurt or feel bloated.
  • Indigestion or heartburn: Heartburn is often described as a burning sensation in the chest or throat and usually occurs after eating. Indigestion, which can happen from eating too quickly or consuming fatty or spicy foods, often leads to upper abdominal discomfort, bloating, and nausea.
  • Irritable bowel syndrome (IBS): IBS is a chronic condition affecting the large intestine. It can cause cramping, abdominal pain, bloating, gas, and changes in bowel habits (predominantly diarrhea or constipation). Mild IBS can often be managed mainly with diet changes and occasional use of OTC medications.
  • Stress and anxiety: Emotional stress can lead to stomach pain for some people because the gut is sensitive to psychological factors.
  • Menstrual cycle: Many people experience abdominal pain related to stomach issues that temporarily happen before or during periods. In addition, menstrual cramps may cause discomfort in the lower abdomen, pelvis, and back.

How Do I Prevent Stomach Pain?

Preventing stomach pain often involves making lifestyle changes:

  • Eat smaller meals more frequently to help prevent indigestion and bloating.
  • Stay active to support digestion and help avoid constipation.
  • Identify and limit foods that trigger your symptoms, such as spicy or fatty foods or carbonated beverages.
  • Manage stress through relaxation strategies, such as yoga, meditation, and deep breathing.
  • Consider booking an appointment with a registered dietitian for personalized nutrition guidance.

These and other lifestyle changes can provide valuable support in managing and preventing stomach-related issues. You can try these options alone or in addition to OTC or prescribed medications.

When to Seek Medical Help

Less commonly, stomach pain can be a sign of a more serious condition—such as inflammation, gastrointestinal infections, or stomach ulcers. Recognizing the symptoms associated with potentially serious conditions can help determine when professional medical evaluation is necessary.

Though many causes of stomach pain can be managed at home, it’s important to seek medical attention for the following symptoms:

  • Intense lower abdominal pain that is sudden or persistent
  • Fever coupled with abdominal pain, which could indicate an infection or inflammation
  • Persistent nausea or vomiting, especially if it prevents you from keeping fluids down
  • Vomiting blood or material that looks like coffee grounds, which suggests bleeding in the digestive tract
  • Black, tar-like, or bloody stools, which may suggest internal bleeding
  • Severe tenderness or rigidness of the belly, which could indicate a serious condition such as an ulcer or tear
  • Jaundice (yellowing of the skin and eyes), a sign of possible liver issues
  • Swelling of the abdomen, which may be a sign of fluid buildup
  • Burning pain in the upper abdomen that gets worse after eating could indicate chronic acid reflux or erosion from stomach acid 
  • Stomach pain alongside constipation (few to no bowel movements) for three or more days

Summary

Stomach pain can arise from various causes, but many effective treatments are available. OTC medications can provide relief for common issues like constipation, gas, and heartburn. For more severe cases, prescription medications may be necessary. Additionally, lifestyle changes and nondrug remedies can help prevent future discomfort.

If you experience persistent or severe symptoms, contact a healthcare professional for guidance.

Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Lakhoo K, Almario CV, Khalil C, Spiegel BMR. Prevalence and characteristics of abdominal pain in the United States. Clin Gastroenterol Hepatol. 2021;19(9):1864-1872.e5. doi:10.1016/j.cgh.2020.06.065

  2. National Institutes of Diabetes and Digestive and Kidney Diseases. Treatment for constipation.

  3. MedlinePlus. Simethicone.

  4. National Institutes of Diabetes and Digestive and Kidney Diseases. Treatment for gas in the digestive tract.

  5. National Institute Diabetes and Digestive and Kidney Diseases. Treatment for GER & GERD.

  6. National Institute of Diabetes and Digestive and Kidney Diseases. Treatment for diarrhea.

  7. Institute for Quality and Efficiency in Health Care. Overview: period pain

  8. Lacy BE. Managing IBS-C: focus on symptom control. Gastroenterol Hepatol (N Y). 2024;20(4):216-226.

  9. Lembo A, Sultan S, Chang L, et al. AGA Clinical Practice Guideline on the Pharmacological Management of Irritable Bowel Syndrome With Diarrhea. Gastroenterology. 2022;163(1):137-151. doi:10.1053/j.gastro.2022.04.017

  10. American Gastroenterological Association. Pharmacological management of chronic idiopathic constipation.

  11. Crockett SD, Greer KB, Heidelbaugh JJ, et al. American Gastroenterological Association Institute Guideline on the Medical Management of Opioid-Induced Constipation. Gastroenterology. 2019;156(1):218-226. doi:10.1053/j.gastro.2018.07.016

  12. Elmaghraby DA, Alsalman GA, Alawadh LH, et al. Integrated traditional herbal medicine in the treatment of gastrointestinal disorder: the pattern of use and the knowledge of safety among the Eastern Region Saudi population. BMC Complement Med Ther. 2023;23(1):373. doi:10.1186/s12906-023-04197-0

  13. Kumar LS, Pugalenthi LS, Ahmad M, et al. Probiotics in irritable bowel syndrome: a review of their therapeutic role. Cureus. 2022;14(4):e24240. doi:10.7759/cureus.24240

  14. Bertin L, Zanconato M, Crepaldi M, et al. The role of the FODMAP diet in IBS. Nutrients. 2024;16(3):370. doi:10.3390/nu16030370.

  15. American College of Gastroenterology. Abdominal pain syndrome

  16. Lacy BE, Pimentel M, Brenner DM, et al. ACG Clinical guideline: management of irritable bowel syndrome. Am J Gastroenterol. 2021;116(1):17-44. doi:10.14309/ajg.0000000000001036

  17. Moloney RD, Johnson AC, O’Mahony SM, et al. Stress and the microbiota-gut-brain axis in visceral pain: relevance to irritable bowel syndrome. CNS Neurosci Ther. 2016;22(2):102-117. doi:10.1111/cns.12490

  18. Hamaguchi T, Tayama J, Suzuki M, et al. The effects of locomotor activity on gastrointestinal symptoms of irritable bowel syndrome among younger people: an observational study [published correction appears in PLoS One. 2020;15(12):e0244465. doi: 10.1371/journal.pone.0244465]. PLoS One. 2020;15(5):e0234089. doi:10.1371/journal.pone.0234089

Patricia Weiser, Updated Headshot

Patricia Weiser, Updated Headshot

By Patricia Weiser, PharmD

Patricia Weiser, PharmD, is a licensed pharmacist and freelance medical writer. She has more than 14 years of professional experience.


اكتشاف المزيد من LoveyDoveye

اشترك للحصول على أحدث التدوينات المرسلة إلى بريدك الإلكتروني.