What Medicine Is Good for Stomach Cramps?

The best medicine for stomach cramps depends on what’s causing them. For general abdominal cramping, an antispasmodic like hyoscine butylbromide (sold as Buscopan in many countries) relaxes the intestinal muscles and targets the cramp itself. For cramps tied to menstrual pain, ibuprofen is the strongest over-the-counter option. And for cramps caused by trapped gas, a simethicone product works by breaking up gas bubbles so they can pass. Most of these start working within 30 to 60 minutes.

Antispasmodics for Gut Cramps

If your stomach cramps feel like your insides are squeezing or tightening, the most direct fix is an antispasmodic. These medicines relax the smooth muscle lining your intestines, which is the tissue actually contracting and causing the pain. Hyoscine butylbromide is the most widely available over-the-counter antispasmodic and has research backing its use for functional gut cramps, including those linked to irritable bowel syndrome. It works locally in the gut rather than throughout the whole body, which limits side effects, though dry mouth and blurred vision can still occur.

Peppermint oil capsules are another option that works through a similar muscle-relaxing mechanism. They’re available without a prescription and are commonly used for IBS-related cramping. Enteric-coated capsules are preferable because they dissolve in the intestines rather than the stomach, reducing the chance of heartburn.

For people with recurring or severe cramps, doctors can prescribe stronger antispasmodics. These include medications that block nerve signals to the gut muscles more aggressively. Common side effects at prescription strength include dry mouth, dizziness, and blurred vision. A 2025 international consensus on IBS treatment confirmed that antispasmodics are effective for both overall symptoms and abdominal pain.

Anti-Inflammatory Pain Relievers

NSAIDs (non-steroidal anti-inflammatory drugs) like ibuprofen and naproxen are the first-line treatment for menstrual cramps and can also help with other types of inflammatory abdominal pain. They work by blocking the chemicals that trigger muscle contractions and inflammation. For period pain specifically, a large network meta-analysis ranked ibuprofen as the best overall choice when balancing effectiveness and safety, with diclofenac slightly more powerful but carrying higher risk of side effects.

Ibuprofen and naproxen both reach pain-relieving levels within 30 to 60 minutes. Taking them at the first sign of cramping, rather than waiting until pain peaks, gives better results because they prevent the buildup of inflammatory compounds rather than just masking pain after the fact.

One important caveat: NSAIDs can irritate the stomach lining. If your cramps are caused by acid reflux, gastritis, or an ulcer, ibuprofen and naproxen will likely make things worse. People over 65, those with a history of stomach ulcers, or anyone taking blood thinners or corticosteroids face the highest risk of serious gastrointestinal side effects from NSAIDs. Acetaminophen (Tylenol) is a safer alternative for pain relief in these situations, though it won’t reduce inflammation or muscle contractions the way NSAIDs do.

Gas-Related Cramping

Cramps that come with bloating, pressure, or a visibly distended belly are often caused by trapped gas. Simethicone is the go-to medicine here. It acts as a surfactant, lowering the surface tension of gas bubbles in your digestive tract so they merge into larger bubbles that are easier to pass through belching or flatulence. It doesn’t reduce gas production, but it makes existing gas less painful and easier to expel.

Simethicone is found in products like Gas-X and Mylicon and is also combined with antacids or anti-diarrheal medicines. It’s not absorbed into the bloodstream, so side effects are essentially nonexistent. If gas cramps are a recurring problem, though, that’s worth investigating further, as it can point to food intolerances or bacterial imbalances in the gut.

When Acid Is the Problem

Stomach cramps that come with a burning sensation, feel worse after eating, or sit high in your abdomen near your ribs may stem from excess stomach acid. Antacids containing calcium carbonate (like Tums) neutralize acid immediately but wear off quickly. H2 blockers like famotidine (Pepcid) take longer to kick in but suppress acid production for several hours. They’re approved for heartburn, indigestion, and ulcer-related pain. Neither type is designed for muscle-spasm cramping, so they won’t help if the pain feels like squeezing or tightening lower in your abdomen.

Cramps With Diarrhea

If your cramps come alongside loose, urgent stools, loperamide (Imodium) slows intestinal contractions and gives your gut more time to absorb water. This reduces both the diarrhea and the cramping that accompanies it. Some formulations combine loperamide with simethicone for cramps that involve both diarrhea and gas. Loperamide is effective for acute episodes, but if diarrhea-predominant cramping is your norm, that pattern fits IBS and benefits from a longer-term management plan rather than repeated self-treatment.

Matching the Medicine to the Cramp

  • Squeezing or spasming pain: Antispasmodic (hyoscine butylbromide or peppermint oil)
  • Menstrual cramps: Ibuprofen, taken early
  • Bloating and pressure: Simethicone
  • Burning or acid-related pain: Antacid or famotidine
  • Cramps with diarrhea: Loperamide
  • General soreness without a clear cause: Acetaminophen

When Stomach Cramps Need More Than Medicine

A heating pad applied to the abdomen is one of the simplest and most effective non-drug options for cramps of almost any origin. Low-level topical heat has been shown to help with both menstrual and gut-related cramping.

Some cramp patterns signal something that over-the-counter medicine can’t fix. Seek emergency care if cramps come with vomiting blood, black or bloody stools, blood in your urine, a swollen and tender abdomen, high fever, persistent vomiting, or chest pain. Cramps that follow an injury, cause you to feel faint, or come with shortness of breath also warrant immediate attention. These symptoms can point to conditions like internal bleeding, bowel obstruction, or appendicitis, where the cramping is a warning sign rather than the core problem.