The fastest way to stop a cramp depends on what kind you’re dealing with. A charley horse in your calf needs a different approach than period cramps or a stomach cramp after eating. But across all types, cramps share a common thread: muscles contracting forcefully and refusing to relax. Here’s how to shut them down, organized by type so you can jump to what’s relevant.
Muscle Cramps: Immediate Relief
When a muscle seizes up in your leg, foot, or hand, your first move is to stretch it. Gently lengthen the cramping muscle and hold the stretch. For a calf cramp, flex your foot so your toes point toward your shin, or stand and press into a wall with the cramping leg straight behind you. For a foot cramp, grab your toes and pull them back. Hold the position until the spasm releases, which typically takes 15 to 30 seconds.
Massaging the muscle while stretching it can speed things up. Press firmly into the knot with your thumb or palm and work in a circular motion. Applying heat with a warm towel or heating pad afterward helps the muscle fully relax. If the cramp just happened during exercise, ice can also work since it dulls the nerve signals firing at the muscle.
One surprisingly effective trick: drinking a small amount of pickle juice. Research published in Medicine and Science in Sports and Exercise found that pickle juice shortened cramp duration by about 49 seconds compared to water, with relief kicking in roughly 35 seconds after swallowing. The mechanism isn’t about replacing lost salt that quickly. Instead, the strong vinegar taste triggers a reflex in the back of your throat that signals the nervous system to stop the overactive nerve firing that’s causing the spasm. Mustard and very sour liquids may work the same way.
Why Muscle Cramps Happen
Most muscle cramps start with overexcitable nerves, not the muscle itself. Fatigue, dehydration, and electrolyte loss can all destabilize the nerve signals controlling your muscles, causing them to fire uncontrollably. Dehydration is the most common culprit because losing fluid shifts your electrolyte balance, which disrupts the electrical signaling at the point where nerves meet muscle fibers.
Sodium gets the most attention in exercise-related cramps. Research from the Gatorade Sports Science Institute found that athletes prone to cramping lost significantly more sodium in their sweat during training, with sweat sodium concentrations averaging 53 mmol/L compared to 38 mmol/L in cramp-free athletes. There’s no single threshold that guarantees a cramp, but if you’re a heavy or salty sweater, replacing sodium during long workouts matters more for you than for others. A sports drink or salted snack during prolonged exercise can help.
Nighttime leg cramps are common in adults over 50 and often have no clear cause. You may have heard that magnesium supplements fix these. The evidence is underwhelming. A randomized trial of 94 adults taking magnesium oxide for four weeks found no meaningful difference compared to a placebo: cramp frequency dropped in both groups by nearly the same amount. A systematic review reached the same conclusion, finding it unlikely that magnesium provides clinically meaningful cramp prevention for older adults. Staying well hydrated, stretching your calves before bed, and keeping blankets loose around your feet are more reliably helpful strategies.
Period Cramps: What Works Best
Menstrual cramps are a different animal. They’re caused by your uterus contracting to shed its lining, driven by chemicals called prostaglandins. The more prostaglandins your body produces, the stronger the contractions and the worse the pain. This is why some people have mild periods while others are doubled over for days.
NSAIDs like ibuprofen are the most effective over-the-counter option because they do double duty: they block pain signals and reduce the prostaglandin production that’s causing the contractions in the first place. The key is timing. Ibuprofen works best if you take it before the cramps get severe. If you know your worst cramps hit on day two, start taking it on day one of your cycle. Waiting until you’re already in significant pain means prostaglandins have already built up and the medication has to play catch-up.
Heat therapy is the other go-to, and it’s not just a comfort measure. Continuous low-level heat at around 104°F (40°C) applied to your lower abdomen relaxes the uterine muscle and increases blood flow to the area. Adhesive heat wraps that maintain this temperature for eight hours can provide relief comparable to ibuprofen for many people, and you can combine both methods safely. A hot water bottle or a microwavable heat pack works too, though you’ll need to reheat them periodically.
Other strategies that help: regular aerobic exercise between periods reduces cramp severity over time. Orgasm can provide short-term relief because it increases blood flow to the uterus and triggers the release of pain-relieving chemicals. Gentle yoga, particularly poses that open the hips and stretch the lower back, can ease tension in the surrounding muscles that tighten in response to uterine cramping.
Stomach and Digestive Cramps
Cramps in your abdomen that feel like squeezing or twisting are usually smooth muscle spasms in your intestines. Common triggers include gas, bloating, food intolerances, stress, and irritable bowel syndrome (IBS). Unlike skeletal muscle cramps, you can’t stretch these out, so the approach is different.
Peppermint oil is one of the better-studied options. Its active ingredient relaxes the smooth muscle lining your intestines by interfering with the calcium signals that drive contractions. For people with IBS, peppermint oil capsules taken before meals can reduce the frequency and intensity of abdominal cramping. Peppermint tea offers a milder version of the same effect and is worth trying for occasional digestive cramps.
Heat also helps here. Placing a warm compress or heating pad over your abdomen relaxes the smooth muscle underneath and can ease spasms within 15 to 20 minutes. Lying on your left side can help move trapped gas through your colon more efficiently since it follows the natural curve of your digestive tract. Avoiding carbonated drinks, eating slowly, and identifying food triggers (dairy and high-FODMAP foods are common offenders) reduces how often digestive cramps happen in the first place.
Preventing Cramps Before They Start
For muscle cramps, the prevention checklist is straightforward: stay hydrated throughout the day, not just during exercise. Include sodium and potassium in your diet through foods like bananas, potatoes, salted nuts, and broth. Stretch your calves and hamstrings regularly, especially before bed if you’re prone to nighttime cramps. Warm up properly before intense exercise and don’t ramp up training volume faster than your body can adapt, since muscle fatigue is a primary cramp trigger.
For period cramps, consistent aerobic exercise (even walking 30 minutes most days) has been shown to reduce severity over multiple cycles. Some people find that omega-3 fatty acids from fish or supplements help, likely by shifting the body’s prostaglandin production toward less inflammatory types. Hormonal birth control is another option since it thins the uterine lining, which means fewer prostaglandins and lighter, less painful periods.
When a Cramp Signals Something Else
Most cramps are harmless, but a few warning signs suggest something more serious. A “cramp” in your calf that comes with visible swelling, skin discoloration (red or purple), and a feeling of warmth in the leg could be a blood clot known as deep vein thrombosis. This is especially worth considering if the pain doesn’t behave like a typical cramp: it doesn’t release with stretching, it persists for hours, or it came on without any physical exertion.
Cramps that happen frequently in multiple muscle groups, get progressively worse over weeks, or are accompanied by muscle weakness could point to a nerve or circulation issue worth investigating. Period cramps that don’t respond to NSAIDs at all, that get significantly worse over time, or that cause pain outside of menstruation may indicate endometriosis or fibroids rather than typical menstrual pain.

