What Helps With Leg Cramps: Relief and Prevention

Stretching the cramped muscle is the fastest way to stop a leg cramp, and it works within seconds for most people. For prevention, a nightly stretching routine before bed, staying hydrated, and addressing any electrolyte gaps are the most reliable strategies. Beyond those basics, the answer depends on what’s causing your cramps in the first place.

How to Stop a Cramp Right Now

When a cramp hits, your goal is to lengthen the muscle that’s contracting involuntarily. For a calf cramp (the most common type), keep your leg straight and pull the top of your foot toward your face. You can also stand up, put your weight on the cramped leg, and press down firmly. For a cramp in the front of your thigh, pull your foot up behind you toward your buttock, holding a chair for balance. Once the acute spasm passes, gently massage the area.

Applying heat during the cramp or ice afterward can also help. A warm towel or heating pad relaxes the muscle while it’s seizing, and cold can ease the soreness that sometimes lingers for hours.

Why Pickle Juice Actually Works

This one sounds like an old wives’ tale, but there’s real science behind it. A small amount of pickle juice can shut down a cramp faster than water or sports drinks, and it works before the liquid has time to reach your stomach, let alone your muscles. The acetic acid (vinegar) triggers receptors in the back of your throat that send a signal through the nervous system to quiet the overactive nerve firing that causes the cramp. It’s a reflex, not a hydration fix. About one to two ounces is enough. Some athletes keep small packets of vinegar-based drinks on hand for exactly this reason.

The Case for Nightly Stretching

If you get cramps regularly at night, a consistent stretching routine before bed is the intervention with the strongest practical evidence. A trial in older adults found that stretching the calves and hamstrings every night, immediately before sleep, reduced both the frequency and severity of nocturnal leg cramps over six weeks. The routine doesn’t need to be elaborate. A wall-supported calf stretch (leaning forward with your heel on the ground) held for 30 seconds on each side, plus a seated hamstring stretch, is enough. The key is doing it every night, not just on nights when you feel tight.

Electrolytes: What Actually Matters

Low levels of potassium, calcium, and magnesium all contribute to muscle cramps because these minerals help regulate how your nerves signal your muscles to contract and relax. When any of them drops too low, nerves can fire erratically, and muscles seize up. Magnesium is particularly interesting because low magnesium also drags calcium levels down by impairing the glands that regulate calcium in your blood.

That said, the evidence for magnesium supplements specifically is mixed. A large systematic review of 11 trials found no overall reduction in leg cramps from magnesium, and a separate analysis in pregnant women found no benefit either. However, one well-designed trial showed that taking magnesium oxide daily for at least 60 days cut cramp frequency from about 5.4 episodes per week down to 1.9, compared to a smaller drop in the placebo group (6.4 down to 3.7). Cramp duration also dropped significantly. The catch: shorter courses of supplementation didn’t work. If you try magnesium, give it at least two months before deciding whether it helps.

For potassium and calcium, food sources are generally more effective and safer than supplements. Bananas, potatoes, avocados, and beans are rich in potassium. Dairy, leafy greens, and fortified foods cover calcium. If you suspect a genuine deficiency (symptoms like persistent muscle twitching, numbness, or tingling), a simple blood test can confirm it.

Hydration’s Role

Dehydration doesn’t directly cause cramps in the way most people assume, but it concentrates the electrolytes in your blood and reduces blood flow to muscles, both of which raise your cramp risk. This is why cramps are more common in hot weather, during intense exercise, and in people who take diuretics. Drinking enough water throughout the day is a baseline prevention step, especially if you’re active or on medications that increase fluid loss.

Medications That Trigger Cramps

Three drug classes are most commonly linked to leg cramps: diuretics (water pills), statins (cholesterol medications), and inhaled long-acting bronchodilators used for asthma and COPD. A large study in JAMA Internal Medicine found that people starting inhaled bronchodilators were about 2.4 times more likely to need cramp treatment in the following year. Potassium-sparing diuretics roughly doubled the risk, and thiazide diuretics increased it by about 48%. The link with statins was smaller but still statistically significant.

If your cramps started or worsened after beginning a new medication, that connection is worth raising with whoever prescribed it. Sometimes a dose adjustment or switch to a different drug in the same class resolves the problem.

Vitamin B Complex

There’s limited but intriguing evidence for B vitamins. A small study found that a B-complex supplement (including vitamin B6) put 86% of treated patients into remission from muscle cramps, even in people with no known vitamin deficiency. The American Academy of Neurology classified B-complex as “possibly effective” for cramps based on this evidence. Side effects were minimal. It’s not a first-line solution, but if stretching and electrolyte adjustments haven’t solved the problem, it’s a low-risk option to try.

Why Quinine Is Not the Answer

Quinine, found in tonic water and available by prescription, was once widely recommended for leg cramps. The FDA has since made clear that quinine is not considered safe or effective for this use. It carries risks of a dangerous drop in blood platelets, life-threatening allergic reactions, and heart rhythm problems. Fatalities and kidney failure requiring dialysis have been reported. The only FDA-approved use for quinine is treating malaria. If someone suggests tonic water as a cramp remedy, the amount of quinine in commercial tonic water is small, but it’s still not a strategy worth pursuing given the risk profile.

When Cramps Signal Something Else

Most leg cramps are benign, especially if they happen occasionally at night or after exercise. But recurring cramps that start during walking and stop when you rest can be a sign of peripheral artery disease, a condition where narrowed arteries reduce blood flow to the legs. Other warning signs of PAD include small sores on the feet that don’t heal and leg pain that persists even at rest. This pattern is distinct from a typical charley horse, which strikes suddenly (often at night), peaks in seconds, and fades within minutes. If your cramps follow the exercise-rest pattern or come with skin changes or wounds on your feet, that’s a different situation that needs evaluation.