What Actually Helps Leg Cramps — and What Doesn’t

Stretching the cramped muscle is the single most effective thing you can do when a leg cramp strikes. For prevention, a combination of daily stretching, staying hydrated, and addressing any underlying mineral shortfalls keeps cramps from coming back. Here’s what works, starting with what to do right now if you’re in pain.

Immediate Relief During a Cramp

The goal is to lengthen the muscle that’s locked in contraction. For a calf cramp, the most common type, straighten your leg and pull your toes up toward your shin. If you can reach your foot, grab your toes and pull them back gently. You can also stand up and walk on your heels, which forces the calf to stretch. For a thigh cramp (front of the leg), pull your foot behind you toward your buttock while holding a chair or wall for balance.

Once the cramp releases, gently massage the area. The muscle will likely feel sore afterward, similar to a bruise. Applying a warm towel or heating pad helps at this point. Heat increases blood flow and reduces nerve excitability in the area, which eases that lingering tightness. Ice works better if there’s any noticeable swelling, since cold reduces tissue metabolism and inflammation. For a straightforward cramp with no swelling, warmth is usually more comfortable.

Pickle Juice: Why It Actually Works

This isn’t just a folk remedy. In a controlled study, drinking a small amount of pickle juice shortened cramp duration by about 49 seconds compared to water. That’s a meaningful difference when you’re in pain. The effect kicks in far too quickly to be explained by digestion or absorption of electrolytes. Researchers believe the strong vinegar taste triggers a reflex in the mouth and throat that signals the nervous system to calm the overactive nerve firing causing the cramp. A sip or two of vinegar or mustard may work through the same mechanism.

Daily Stretching to Prevent Cramps

Forceful stretching treats a cramp in the moment, but regular daily stretching is the foundation of prevention. The most studied routine for nocturnal leg cramps targets the calf muscles: stand with your feet flat on the floor and lean forward toward a wall for about 20 to 30 seconds, keeping your heels down. Repeat four times. Do this three to four times per day, with the most important sessions in the evening and right before bed.

If you’re pregnant, a wall stretch works well. Stand at arm’s length from a wall, step one foot behind the other, and slowly bend the front knee while keeping the back heel planted. Hold for 30 seconds and switch sides. Stretching before bed consistently reduces the frequency of pregnancy-related leg cramps.

Minerals That Matter

Magnesium is the supplement most commonly linked to cramp prevention, though the evidence is mixed. Clinical trials have tested daily doses ranging from 200 to 366 milligrams of elemental magnesium, typically as magnesium citrate or magnesium lactate. Some people report improvement, particularly those whose dietary magnesium intake is low. Good food sources include nuts, seeds, dark leafy greens, and whole grains.

Calcium also plays a role in muscle contraction. During pregnancy, lower blood calcium levels may contribute to cramps, and the recommended intake is 1,000 milligrams per day. Potassium matters too, especially if you sweat heavily. Average sweat losses run between 120 and 160 milligrams of potassium per liter, and sodium losses are much higher, between 920 and 2,300 milligrams per liter. That said, one study that carefully replaced these electrolytes during exercise found that supplementation alone didn’t reliably prevent cramps. Minerals are one piece of the puzzle, not the whole solution.

Hydration Helps, but It’s Not Everything

Dehydration is often cited as the top cause of leg cramps, but the relationship is more nuanced than “drink more water.” Staying well hydrated matters, particularly if you exercise, work outdoors, or take medications that increase fluid loss. But research shows that fluid and electrolyte replacement during exercise doesn’t eliminate cramps entirely. The current understanding is that cramps involve overexcited nerves, not just depleted fluids. Still, chronic mild dehydration can set the stage for more frequent cramping, so consistent water intake throughout the day is a reasonable baseline habit.

Medications That Cause Cramps

If your cramps started or worsened after beginning a new medication, diuretics (water pills) are the most likely culprit. Among blood pressure medications, diuretics are the class most frequently associated with muscle cramps. One thiazide-type diuretic lists cramps as a side effect in more than 5% of users. The pattern is consistent: when a blood pressure drug is combined with a diuretic, cramp rates climb compared to the same drug used alone. Loop diuretics can lower calcium levels, adding another potential trigger. Even potassium-sparing diuretics, which are sometimes prescribed specifically to offset electrolyte loss, are associated with cramping.

Statins (cholesterol-lowering drugs) are another common source of muscle complaints, though outright cramps are less frequently reported than general muscle aching. If you suspect a medication connection, that’s worth discussing with your prescriber, since adjusting the dose or switching to a different drug can sometimes resolve the problem.

Nighttime Cramp Prevention

Nocturnal leg cramps tend to hit the calf and strike without warning, jolting you awake. Beyond the evening stretching routine described above, a few adjustments to your sleep setup can help. Keep your sheets and blankets loose at the foot of the bed. Tightly tucked covers push your feet into a pointed position, which shortens the calf muscles and makes them more prone to cramping. Sleeping on your back with a pillow under your knees, or on your side with your feet relaxed, reduces this tension.

Cutting back on caffeine and alcohol, especially in the evening, may also reduce nighttime cramps for some people. Avoiding heavy exercise right before bed is sensible, and if you’ve been standing on hard surfaces like concrete all day, the accumulated muscle fatigue can set you up for cramps later that night. Supportive footwear during the day makes a difference.

Cramps vs. Restless Legs

These two conditions are easy to confuse because they both affect the legs and worsen at night, but they feel very different. A leg cramp is a sudden, painful, involuntary contraction. You can often see and feel the muscle balling up into a hard knot. Restless leg syndrome, by contrast, involves a creeping discomfort or an irresistible urge to move your legs, usually without a visible muscle contraction. Moving your legs relieves restless leg symptoms but doesn’t help (and can worsen) an active cramp. If your nighttime leg problems feel more like restlessness than sharp pain, the cause and treatment are different.

Why Quinine Is Not the Answer

Quinine, found in tonic water and previously prescribed for leg cramps, is no longer considered safe for this purpose. The FDA has explicitly stated that quinine is not safe or effective for treating or preventing leg cramps. It’s approved only for malaria. The risks include a dangerous drop in platelet count, severe allergic reactions, and heart rhythm changes. Fatalities and kidney failure requiring dialysis have been reported. Drinking a glass of tonic water contains far less quinine than a prescription dose, but there’s no evidence it helps cramps, and the risk-benefit calculation simply doesn’t justify it.