Magnesium is often suggested for night-time leg cramps and for better sleep. But what does the research actually show? Here's an honest summary of the best evidence we could find, what magnesium does in the body, how much you need, and when cramps or poor sleep are worth a chat with your GP.
What does magnesium do?
Magnesium is a mineral found in a wide variety of foods. The roles a food or supplement may describe in the UK are set by the GB Nutrition and Health Claims Register. They include:
- Magnesium contributes to normal muscle function.
- Magnesium contributes to a reduction of tiredness and fatigue.
- Magnesium contributes to normal functioning of the nervous system.
- Magnesium contributes to normal psychological function.
- Magnesium contributes to electrolyte balance.
Notice what isn't on the list: there are no authorised claims that magnesium helps cramps, sleep or restless legs. That's why we don't make those claims for our products.
Does magnesium help with leg cramps?
The most thorough look at this question is a Cochrane systematic review published in 2020. The review found 11 randomised trials involving 735 people.
What it found:
- Older adults with night-time leg cramps. The differences in how often cramps happened, comparing magnesium with a placebo, were small and not statistically significant. The authors concluded it is unlikely that magnesium provides clinically meaningful cramp prevention for older adults with skeletal muscle cramps.
- Pregnancy-related leg cramps. The trials were conflicting and judged at high risk of bias, so the authors called for more research.
- Exercise-related cramps. The review found no randomised trials at all.
- Side effects. These were mostly digestive, such as diarrhoea.
So, on current evidence, magnesium isn't a proven fix for cramps.
What helps leg cramps?
The NHS says leg cramps are common, usually harmless, and often happen at night or when resting. It suggests:
- stretching and massaging the muscle during a cramp
- standing up and putting your weight on the affected leg
- regular calf-stretching exercises, which may help reduce cramps
The NHS lists possible causes including ageing, straining muscles during exercise, pregnancy, dehydration and certain medicines, such as statins and diuretics.
See a GP if leg cramps are disturbing your sleep, if you also have numbness or swelling in your legs, or if cramps last longer than 10 minutes.
Does magnesium help you sleep?
A 2021 systematic review and meta-analysis looked at magnesium supplements for insomnia in older adults. It found only three small randomised trials, with 151 people in total.
- People taking magnesium fell asleep about 17 minutes faster on average than those taking a placebo.
- The increase in total sleep time (about 16 minutes) was not statistically significant.
- All three trials were at moderate to high risk of bias, and the evidence was rated low to very low quality.
The authors concluded that the quality of the research was not good enough for doctors to make well-informed recommendations about magnesium for insomnia in older adults. In short, the evidence is weak and more research is needed.
What helps sleep?
The NHS says insomnia usually improves by changing sleep habits, and that adults need on average 7 to 9 hours. Its suggestions include:
- going to bed and getting up at the same time every day
- relaxing for at least an hour before bed
- keeping the bedroom dark and quiet
- exercising regularly during the day
- not smoking or drinking alcohol, tea or coffee for at least 6 hours before bed
The NHS notes that conditions such as restless legs syndrome can cause insomnia. If changing your habits hasn't helped, your sleep problems have lasted months, or they're affecting your daily life, see a GP.
How much magnesium do you need?
According to the NHS, adults aged 19 to 64 need:
- 300mg a day (men)
- 270mg a day (women)
Good food sources include spinach, nuts and wholemeal bread. The NHS says you should be able to get all the magnesium you need from a varied and balanced diet.
If you take a supplement, don't take too much. The NHS says 400mg or less a day of magnesium from supplements is unlikely to cause any harm, and that high doses (more than 400mg) for a short time can cause diarrhoea.
Does the form of magnesium matter?
Supplements use different magnesium compounds. In one small randomised study of 46 healthy adults, magnesium citrate was absorbed better than magnesium oxide. It's a single, small study, so it's a reason to read labels rather than a final answer.
Where Dr Marks Triple Magnesium fits
Our Triple Magnesium Complex combines magnesium citrate, magnesium bisglycinate and magnesium malate. One capsule provides 96mg of magnesium, and two capsules provide 192mg (51% of the nutrient reference value). That's well within the NHS's 400mg guidance for supplements. It's suitable for vegetarians and vegans, made in the UK and formulated by GPs.
Magnesium contributes to normal muscle function and to a reduction of tiredness and fatigue. We don't claim that Triple Magnesium treats or prevents cramps, improves sleep or helps restless legs.
Check with your GP or pharmacist first if you have kidney disease, are under medical supervision, or take tetracycline or quinolone antibiotics, bisphosphonates or levothyroxine. Magnesium can reduce the absorption of these medicines, so they're usually taken at a different time of day.
Frequently asked questions
Does magnesium stop leg cramps at night?
The best available evidence, a 2020 Cochrane review, found it is unlikely to provide clinically meaningful cramp prevention in older adults. The evidence in pregnancy is conflicting. Calf stretches are the NHS's first suggestion. See a GP if cramps disturb your sleep.
Does magnesium help you sleep?
The research is limited. One review of three small trials in older adults found people fell asleep around 17 minutes faster, but the evidence was low quality. There are no authorised claims linking magnesium to sleep.
How much magnesium should I take a day?
Adults need 300mg (men) or 270mg (women) a day, which most people can get from food. If you take a supplement, the NHS says 400mg or less a day is unlikely to cause harm.
Can magnesium help restless legs?
There's no authorised health claim for this, and we don't make one. Restless legs can affect sleep, so speak to your GP about the right next steps.
References
- Garrison SR et al. (2020). Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews 9:CD009402. doi:10.1002/14651858.CD009402.pub3. https://pubmed.ncbi.nlm.nih.gov/32956536/ (accessed 14 October 2026)
- Mah J, Pitre T (2021). Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complementary Medicine and Therapies 21:125. doi:10.1186/s12906-021-03297-z (correction published 2024). https://pubmed.ncbi.nlm.nih.gov/33865376/ (accessed 14 October 2026)
- Walker AF et al. (2003). Mg citrate found more bioavailable than other Mg preparations in a randomised, double-blind study. Magnesium Research 16(3):183-91. https://pubmed.ncbi.nlm.nih.gov/14596323/ (accessed 14 October 2026)
- NHS. Leg cramps. https://www.nhs.uk/conditions/leg-cramps/ (accessed 14 October 2026)
- NHS. Insomnia. https://www.nhs.uk/conditions/insomnia/ (accessed 14 October 2026)
- NHS. Vitamins and minerals: others (magnesium). https://www.nhs.uk/conditions/vitamins-and-minerals/others/ (accessed 14 October 2026)
- Department of Health and Social Care. Great Britain nutrition and health claims (NHC) register. https://www.gov.uk/government/publications/great-britain-nutrition-and-health-claims-nhc-register (accessed 14 October 2026)
Food supplements should not be used as a substitute for a varied, balanced diet and a healthy lifestyle. Do not exceed the stated daily dose. Keep out of reach of children. If you are pregnant, breastfeeding, taking any medication or under medical supervision, speak to your GP or pharmacist before taking supplements. This article is general information and is not a substitute for personal medical advice. Dr Marks is not affiliated with or endorsed by the NHS.
Medically reviewed by Dr Mark Wilshere, MBChB, MRCGP (2013), DCH, BSc (Hons), GP
