The short answer
For most people, supplements don't reliably prevent muscle cramps:
- magnesium is unlikely to help typical night cramps in older adults;
- pickle juice shortened cramps in one small lab study, likely through a reflex rather than its salt;
- a varied diet, fluids around exercise and nightly stretching are better places to start;
- supplements make most sense if a test shows you're low in a nutrient.
Most of us have been woken by a sudden calf cramp or had a muscle seize up mid-workout. As a dietitian, I'm often asked whether a supplement will fix it. Here's what the evidence says about food, supplements and what actually helps.
What causes muscle cramps?
A muscle cramp is a sudden, involuntary tightening of a muscle that can be very painful. It happens when nerves keep firing signals to the muscle so it can't relax.
Exercise-related cramps don't seem to have a single cause. A 2022 evidence review concluded they come from a mix of factors, especially muscle fatigue and changes in nerve signalling, rather than simply dehydration or low electrolytes.5 Other common contributors include:
- muscle fatigue, injury or working cold muscles;
- tight or inflexible muscles;
- heavy sweating, vomiting or diarrhoea;
- some medicines, such as diuretics;
- pregnancy and getting older;
- conditions affecting nerves, circulation or how you absorb nutrients (such as coeliac disease or Crohn's disease).
Do supplements help muscle cramps?
Some may help some people with recurring cramps.
Magnesium
Magnesium is the most popular cramp supplement. A Cochrane review found it's unlikely to give a meaningful reduction in cramps for older adults, who are the group most often studied. Results in pregnancy were conflicting, and the review found no trials of magnesium for exercise-related cramps.1 It may still be worth trying if your diet is low in magnesium or a test shows you're low, but don't expect it to work for everyone.
Pickle juice
In a small lab study, drinking a small amount of pickle juice (about 1 mL per kg of body weight) shortened induced muscle cramps by about 49 seconds compared with water.3 It worked too quickly to be from replacing salt, so researchers think it triggers a reflex from the mouth and throat. It's very salty, so it's not a daily drink, and it hasn't been tested for night cramps.
Electrolytes and sports drinks
If you sweat heavily or exercise for long periods in the heat, replacing fluid and sodium may help some people. But the 2022 review found individual prevention plans work better than general advice to drink more.5
Calcium, potassium and other supplements
There's no good evidence that calcium, potassium or vitamin supplements prevent cramps in people who aren't deficient. Potassium supplements can be dangerous with some kidney conditions and medicines, so only take them on medical advice.
Pregnant and getting leg cramps?
Leg cramps are common in pregnancy. A Cochrane review found it's unclear whether magnesium, calcium, vitamins or any other treatment helps, because the studies were small and low quality.2 Talk to your midwife or doctor before taking any supplement for cramps.
Get support with cramps and supplements
Find practitioners on HealthBank who help with sports nutrition and supplement advice. Many offer a free discovery call, online, by phone or in person.
Find a nutrition practitioner →Which foods help muscle cramps?
No single food prevents cramps, but your muscles need several minerals to contract and relax. The best approach is a varied diet without unnecessary restriction.
- Magnesium: legumes, nuts and seeds, wholegrains, dark leafy greens, avocado and bananas.
- Potassium: fruit (especially bananas, oranges and melon), vegetables (potatoes, sweet potato, pumpkin), dairy and fish.
- Calcium: dairy, calcium-fortified plant milks and tofu, canned fish with edible bones, and leafy greens.
- Sodium: most Australians already get plenty from food. If you sweat heavily, you may need a little more around exercise. If you use salt, choose iodised salt. Sea or rock salt has no health advantage.
No foods are known to make cramps worse. Cutting out whole food groups is more likely to cause a problem, because it can leave you short on these nutrients.
How can you prevent muscle cramps?
- Stretch before bed. In a trial of adults over 55, stretching the calves and hamstrings every night before sleep reduced how often night cramps happened and how painful they were.4
- Build training gradually. Fatigue is a major trigger for exercise cramps, so increase distance and intensity step by step.
- Warm up before exercise.
- Fuel and hydrate around long or hot sessions.
- Check your medicines with your doctor or pharmacist if cramps started after a new one.
What should you do when a cramp strikes?
- Stretch gently until the cramp eases. For a calf cramp, straighten your leg and pull your toes towards you.5
- Massage the muscle gently.
- Walk it off once the worst has passed.
When to get help
See your doctor if cramps are frequent, last a long time, disturb your sleep, or started after a new medicine.6 Calf pain with swelling, warmth or redness can be a sign of a blood clot and needs urgent medical attention.
Want a plan that fits your training?
HealthBank practitioners who work in sports nutrition can look at your diet, training and hydration, and whether a supplement is worth trying.
Find a sports nutrition practitioner →Frequently asked questions
Do supplements help muscle cramps?
Magnesium is the top contender and may assist people with recurring cramps.
Does pickle juice stop cramps?
In one small lab study, it shortened induced cramps by about 49 seconds compared with water, probably through a reflex rather than its salt content.
What foods help prevent muscle cramps?
No single food prevents cramps. A varied diet with fruit, vegetables, legumes, nuts, wholegrains and dairy or fortified alternatives covers the minerals your muscles need.
How do you stop night-time leg cramps?
Stretching your calves and hamstrings every night before bed reduced night cramps in a trial of older adults. See your doctor if they're frequent.
References
Research (PubMed)
- Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev. 2020;9(9):CD009402. PubMed 32956536
- Luo L, Zhou K, Zhang J, Xu L, Yin W. Interventions for leg cramps in pregnancy. Cochrane Database Syst Rev. 2020;12(12):CD010655. PubMed 33275278
- Miller KC, Mack GW, Knight KL, et al. Reflex inhibition of electrically induced muscle cramps in hypohydrated humans. Med Sci Sports Exerc. 2010;42(5):953–961. PubMed 19997012
- Hallegraeff JM, van der Schans CP, de Ruiter R, de Greef MHG. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial. J Physiother. 2012;58(1):17–22. PubMed 22341378
- Miller KC, McDermott BP, Yeargin SW, Fiol A, Schwellnus MP. An evidence-based review of the pathophysiology, treatment, and prevention of exercise-associated muscle cramps. J Athl Train. 2022;57(1):5–15. PubMed 34185846
Australian guidelines
- Better Health Channel (Victorian Department of Health). Muscle cramp. View source
This article is general information and isn't a substitute for personalised advice. Speak to your practitioner about your situation.
Robbie is a Sydney-based Accredited Practising Dietitian (APD) and Exercise Scientist with over 17 years of experience. He holds a Bachelor of Exercise Science (Nutrition) and a Master of Nutrition and Dietetics, and is the Director and Co-founder of HealthBank.
