What helps with cramping depends on the type of cramp, but most cramps respond well to a combination of immediate relief techniques and longer-term prevention strategies. Muscle cramps, menstrual cramps, and digestive cramps each have different underlying causes, so the most effective remedies differ for each. Here’s what actually works, based on what the research supports.
Why Cramps Happen in the First Place
Skeletal muscle cramps, the kind that hit your calf at 3 a.m. or stop you mid-run, are driven primarily by neuromuscular fatigue rather than simple dehydration. When a muscle is overworked or held in a shortened position, the balance between excitatory and inhibitory nerve signals tips in the wrong direction. The nerves that tell your muscle to contract become overactive while the ones that tell it to relax become underactive. The result is an involuntary, sustained contraction.
This is why cramps tend to strike specific muscles you’ve been using rather than hitting your whole body at once. If dehydration or electrolyte loss were the sole cause, you’d expect widespread cramping, since those are whole-body changes. That said, fluid and electrolyte balance still plays a supporting role, especially during prolonged exercise in the heat.
Menstrual cramps work differently. The uterus produces hormone-like compounds called prostaglandins that trigger contractions to shed its lining. Higher prostaglandin levels mean stronger, more painful contractions. Digestive cramps, meanwhile, involve smooth muscle in the gut wall going into spasm, often triggered by gas, inflammation, or nervous system sensitivity.
Stopping a Muscle Cramp in the Moment
When a cramp strikes, gentle stretching of the affected muscle is the fastest and most reliable fix. For a calf cramp, flex your foot upward (toes toward your shin) and hold. This activates the inhibitory nerve signals from structures called Golgi tendon organs, which essentially tell the cramping muscle to stand down. Walking on the affected leg can also help by forcing the muscle through its full range of motion.
A more surprising remedy: pickle juice. Research has shown that drinking a small amount of pickle juice can relieve muscle cramps within about 35 seconds. That’s far too fast for any nutrient to be absorbed into the bloodstream. Instead, the acetic acid in the vinegar appears to trigger a reflex in the mouth and throat that sends a signal through the nervous system to shut down the overactive motor neurons causing the cramp. Any strongly vinegar-based liquid may have a similar effect. Mustard, another popular folk remedy, likely works through the same mechanism.
Preventing Nighttime Leg Cramps
Nocturnal leg cramps are extremely common in older adults, and one of the simplest prevention strategies has solid evidence behind it: stretching before bed. A study of older adults found that performing calf and hamstring stretches every night immediately before sleep reduced cramp frequency by an average of 1.2 cramps per night over six weeks. Cramp severity also dropped significantly. The routine doesn’t need to be complicated. Hold a standing calf stretch and a seated hamstring stretch for 30 seconds each on both sides, and repeat two or three times.
Vitamin B complex supplements have also shown promise for nocturnal cramps. In a controlled trial of elderly patients with high blood pressure who experienced severe nighttime leg cramps, 86% of those taking a B-complex supplement had prominent remission of their cramps after three months, while the placebo group saw no meaningful change. The supplement reduced cramp frequency, intensity, and duration.
Magnesium and Electrolytes
Magnesium is one of the most commonly recommended supplements for cramps, though the evidence is more nuanced than the marketing suggests. Clinical trials have tested daily doses ranging from 200 to 366 mg of elemental magnesium, typically as magnesium citrate or magnesium lactate. Results across studies have been mixed for general nighttime cramps, but magnesium supplementation may be more beneficial for people who are genuinely deficient or for pregnancy-related cramps.
If you exercise heavily, especially in the heat, replacing lost electrolytes matters. Sweat contains between 920 and 2,300 mg of sodium per liter and 120 to 160 mg of potassium per liter. Sports drinks designed to prevent cramping during prolonged exercise typically contain around 1,620 mg of sodium, 120 mg of potassium, and 1,800 mg of chloride per serving. For most people doing moderate exercise, eating a balanced diet and staying reasonably hydrated is enough. But if you’re a heavy sweater, training for long sessions, or exercising in heat, a higher-sodium electrolyte drink before and during activity can help.
What Works for Menstrual Cramps
Anti-inflammatory pain relievers like ibuprofen and naproxen are the standard go-to for period cramps because they directly block prostaglandin production. Timing matters more than most people realize. These medications work best when taken before cramps become severe. If you know your worst cramping day is day two of your cycle, start taking ibuprofen on day one. Waiting until pain peaks means prostaglandins have already built up, and you’re playing catch-up.
Heat therapy is equally effective and comes with fewer side effects. A large meta-analysis of 22 randomized trials found that heat therapy provided pain relief comparable to, or slightly better than, anti-inflammatory medications after consistent use. More importantly, heat therapy carried only about 30% of the risk of side effects compared to medication. An electric heating pad, an adhesive warming patch, or a hot water bottle on the lower abdomen all work. Many people find the best results from combining heat with an anti-inflammatory, using less medication overall.
Easing Digestive Cramps
Abdominal cramping tied to irritable bowel syndrome or general gut sensitivity responds well to peppermint oil, which acts as a natural smooth muscle relaxant. The menthol in peppermint blocks calcium channels in the muscle cells lining your intestines, which prevents them from contracting as forcefully. It also appears to act directly on the nerve cells that coordinate gut motility.
Enteric-coated peppermint oil capsules are the most studied form, because the coating prevents the oil from releasing in the stomach (where it can cause heartburn) and instead delivers it to the intestines where it’s needed. Clinical studies have used doses in the range of 180 to 225 mg taken two to three times daily. For occasional digestive cramping, peppermint tea can provide milder relief through the same mechanism.
When Cramps Signal Something Else
Most cramps are harmless, but certain patterns warrant attention. Cramps that involve your arms or trunk rather than just your legs, cramps accompanied by muscle weakness or twitching (fasciculations), or cramps paired with numbness or tingling in a specific nerve pathway can indicate underlying neurological or metabolic problems. Overactive reflexes alongside widespread cramping may point to issues with calcium levels, kidney function, or other systemic conditions.
Cramps that are new, frequent, and don’t respond to stretching, hydration, and the strategies above are worth investigating. This is particularly true if they come with progressive weakness, because that combination can signal nerve or motor neuron disorders that benefit from early evaluation. Isolated calf or foot cramps that happen occasionally, especially at night or after exercise, are almost always benign.