What Medicine Helps With Cramps? OTC and Rx Options

NSAIDs like ibuprofen and naproxen are the most effective over-the-counter medicines for cramps, particularly menstrual cramps. They work by blocking the production of prostaglandins, the hormones directly responsible for causing painful contractions. The best choice depends on what type of cramp you’re dealing with, since menstrual cramps, muscle cramps, and stomach cramps each respond to different treatments.

NSAIDs for Menstrual Cramps

Ibuprofen and naproxen sodium are the first-line treatments for period pain, and they’re more effective than acetaminophen (Tylenol). Women with painful periods have unusually high levels of prostaglandins, which cause the uterus to contract forcefully. NSAIDs block the enzyme that produces prostaglandins, reducing both the intensity and frequency of those contractions.

Standard OTC doses are 200 to 400 mg of ibuprofen every four to six hours (up to 1,200 mg daily) or 220 to 440 mg of naproxen sodium (up to 660 mg daily). The key difference between the two is duration. Both start working within about 30 minutes, but naproxen provides significantly better relief at the 8- to 12-hour mark, making it a better option if you don’t want to redose frequently throughout the day. Ibuprofen, on the other hand, tends to wear off after four to six hours.

Timing matters. Starting your NSAID at the first sign of cramping, or even the day before your period begins if you can predict it, is more effective than waiting until pain is severe. Once prostaglandin levels are already high, it takes longer to bring them down.

Acetaminophen: A Weaker Alternative

Acetaminophen (Tylenol) can help with cramps, but studies consistently show it’s less effective than NSAIDs for period pain. It reduces pain signals in the brain but doesn’t block prostaglandin production in the uterus, so it doesn’t address the root cause of menstrual cramping. It’s a reasonable option if you can’t take NSAIDs due to stomach issues, kidney concerns, or other contraindications.

Heat Therapy Works as Well as Ibuprofen

If you prefer a non-drug option or want to combine approaches, topical heat is surprisingly effective. A randomized controlled trial comparing heat patches to ibuprofen for menstrual cramps found no significant difference in pain relief over 24 hours. The heat patch group actually reported slightly less pain at 8, 12, and 24 hours, though the difference wasn’t statistically meaningful. Continuous low-level heat (from adhesive heat wraps or a heating pad) relaxes uterine muscle directly. Pairing heat with an NSAID can give you faster, more complete relief than either alone.

Hormonal Birth Control for Chronic Period Pain

For cramps that don’t respond well enough to OTC painkillers, hormonal contraceptives are one of the most effective long-term solutions. Combined oral contraceptive pills thin the uterine lining, which means fewer prostaglandins and lighter, less painful periods. In pooled clinical trials, women on the pill were roughly twice as likely to experience pain improvement compared to those on placebo. One large open trial of over 100,000 women found that 65% of first-time pill users with painful periods reported relief. In another study tracking 661 women, 63% had painful periods before starting the pill, but after 12 months only 12% still did.

Low-dose estrogen pills with newer progestins also reduced the need for backup painkillers by about 67% in one trial. Hormonal IUDs work through a similar mechanism, thinning the lining locally, and many women on them eventually stop getting periods altogether.

Medicines for Muscle Cramps and Leg Cramps

Muscle cramps in the legs, especially the nighttime variety, don’t respond to the same treatments as menstrual cramps. NSAIDs can dull the pain after a cramp hits, but they won’t prevent muscle cramps from happening.

Magnesium supplements are widely recommended for leg cramps, but the evidence is underwhelming. A Cochrane review of 11 studies found, with moderate certainty, that magnesium is unlikely to reduce the frequency or severity of muscle cramps in older adults. The evidence in pregnant women was too inconsistent and poorly designed to draw conclusions. Despite its popularity, magnesium supplementation doesn’t appear to be an effective cramp preventive for most people.

Quinine was once the standard treatment for nocturnal leg cramps, but the FDA banned most quinine products for this use due to serious side effects. Prescription alternatives with some supporting evidence include calcium channel blockers, certain nerve pain medications, and muscle relaxants. These are typically tried in sequence before a doctor would consider a short, four- to six-week trial of quinine as a last resort.

Prescription Muscle Relaxants for Spasms

For cramps caused by acute muscle injuries, particularly back spasms, doctors sometimes prescribe skeletal muscle relaxants. These are most commonly used for lower back pain and work by reducing muscle tension and involuntary contractions. They’re intended for short-term use alongside rest and physical therapy, not as long-term cramp management. Drowsiness is the most common side effect, which is why they’re often taken at bedtime.

Antispasmodics for Stomach and Intestinal Cramps

Abdominal cramps from conditions like irritable bowel syndrome respond to a different class of drugs called antispasmodics. These medications relax the smooth muscle in the walls of the intestines, reducing the painful contractions and spasms that characterize IBS and other functional gut disorders. About 30% of people with IBS have used antispasmodics at some point. They work through several mechanisms: some block nerve signals that trigger contractions, while others prevent calcium from entering smooth muscle cells, which is what makes them contract in the first place. These require a prescription and are typically part of a broader management plan that includes dietary changes.

Who Should Be Careful With NSAIDs

NSAIDs are safe for most people when used at OTC doses for a few days at a time, but certain groups face real risks. The biggest concern is gastrointestinal bleeding. Risk factors include being 65 or older, having a history of stomach ulcers, and taking blood thinners or corticosteroids at the same time. Among common NSAIDs, ibuprofen carries the lowest gastrointestinal risk (about 2.7 times baseline), while naproxen carries a higher risk (about 5.6 times baseline). If you’re taking antiplatelet medications after a heart attack, adding an NSAID doubles your risk of GI bleeding and increases cardiovascular risk by 40%.

For people who need cramp relief but fall into a higher-risk category, acetaminophen, heat therapy, or talking to a provider about prescription alternatives are safer paths.