Skip to content
A practical look at what the research on magnesium and sleep actually found, whether one form is better than another, how much is too much and when poor sleep or anxiety needs more than a supplement.
Health

Magnesium for Sleep and Anxiety: Does It Really Work?

A practical look at what the research on magnesium and sleep actually found, whether one form is better than another, how much is too much and when poor sleep or anxiety needs more than a supplement.

Magnesium is a mineral essential for healthy muscles, nerves, bones and blood sugar levels, and it is found in green leafy vegetables, legumes, nuts and seeds, and wholegrains.1

It has also become one of the most talked-about supplements for sleep, and magnesium glycinate in particular is searched for far more often than magnesium for sleep itself. Most of that interest comes from social media rather than from clinical research.

The evidence for magnesium and sleep is real but small, the evidence for anxiety is weaker again, and the differences between the forms on the shelf are not what the marketing suggests.

What does magnesium do in the body?

Magnesium is needed for healthy muscles, nerves, bones and blood sugar control, and not getting enough over time can increase the chance of health problems including heart attack, stroke, diabetes and osteoporosis.1

Low magnesium can cause headaches, loss of appetite, nausea and vomiting, and fatigue and weakness. Severe deficiency can cause numbness or tingling, muscle cramps, seizures and abnormal heart rhythm.1

Deficiency is more likely in people who do not eat enough magnesium, particularly older people, and in people with type 2 diabetes, digestive conditions such as Crohn's disease, long-term vomiting or diarrhoea, kidney problems, long-term use of some medicines such as diuretics or reflux medicines, and alcohol dependency.2

None of this establishes that extra magnesium improves sleep in someone whose intake is already adequate. Correcting a shortfall and adding more on top of enough are different things, and most of the marketing blurs them.

Does magnesium actually help you sleep?

There is some supporting evidence, but the evidence base is more limited than the popularity of these products might suggest.

The relevant evidence comes from a 2021 systematic review and meta-analysis, which identified three randomised controlled trials involving 151 older adults with insomnia across three countries. When pooled, the studies found that oral magnesium reduced the time taken to fall asleep by 17.36 minutes compared with placebo (95% CI −27.27 to −7.44). Total sleep time increased by 16.06 minutes, although this difference was not statistically significant.⁴

The authors were direct about the limits. All the trials were at moderate to high risk of bias, the outcomes were supported by low to very low quality evidence, and they concluded that the quality of the literature was substandard for making well-informed recommendations.4

Two things follow. The participants were older adults with diagnosed insomnia, so the findings do not transfer neatly to a younger person having a run of poor nights. And falling asleep 17 minutes faster, in trials of this quality, is a modest and uncertain result rather than a reason to expect a transformation.

Magnesium may help some people fall asleep slightly faster, but the evidence is limited. Describing it as a treatment for sleep problems would go beyond what the current research supports.

Can magnesium help with anxiety?

The evidence here is weaker than for sleep, and it comes with a complication worth knowing about.

A 2017 systematic review examined 18 studies of magnesium supplementation and subjective anxiety. Every study recruited people already vulnerable to anxiety, including those with mild anxiety, premenstrual syndrome, postpartum status or hypertension. Results were mixed: four of eight studies in anxious samples and four of seven in premenstrual syndrome samples reported positive effects, magnesium had no effect on postpartum anxiety, and no study used a validated measure of subjective stress. The authors concluded that the existing evidence is suggestive but of poor quality.5

The complication is that a number of the trials tested magnesium combined with vitamin B6 rather than magnesium on its own.5 That matters because many combination products on the shelf do the same thing.

Healthdirect notes that some magnesium supplements contain vitamin B6, which may be listed on the label as pyridoxine hydrochloride or pyridoxal 5-phosphate.1 The Therapeutic Goods Administration (TGA) has warned that supplementary vitamin B6 can cause peripheral neuropathy, with symptoms including tingling, burning or numbness usually in the hands or feet, and has found that this can occur at doses below 50 mg a day and in people taking several products containing vitamin B6.6

So if you are considering magnesium for anxiety, read the full ingredient list rather than the front of the pack, and add up the vitamin B6 across everything you take.

Which form of magnesium is best?

Magnesium glycinate has become the default recommendation online, and the evidence does not establish it, or any other form, as better for sleep.

Supplements use compounds such as magnesium glycinate, citrate, oxide, chloride and aspartate. These differ in how well the magnesium is absorbed and in how likely they are to cause a laxative effect, with magnesium oxide generally poorly absorbed. What no trial has shown is that one form produces better sleep than another.

The number that actually allows a comparison is the elemental magnesium per dose, which is the amount of magnesium the product delivers rather than the weight of the whole compound. A label showing a large compound weight can supply considerably less magnesium than that figure suggests. Comparing magnesium supplements on elemental magnesium per daily dose is the single most useful habit when choosing between them.

Price is not a guide either. A higher price does not indicate a better-studied formulation, and a form that is trending is not the same as a form that has been tested for the purpose you have in mind.

If a particular form upsets your stomach, trying a different one is reasonable.

Products mentioned

How much magnesium should you take?

The Australian recommended dietary intake is 400 mg a day for men aged 19 to 30 and 420 mg a day for men aged 31 and over, and 310 mg a day for women aged 19 to 30 and 320 mg a day for women aged 31 and over.3

The upper level works differently from most other minerals, and this is the point most worth understanding. It is set at 350 mg a day and applies to magnesium from supplements only, not to magnesium from food.3 The reason is that the limiting effect is diarrhoea caused by unabsorbed magnesium salts in the gut rather than a toxic effect on the body.

In practice, you can exceed 350 mg in total daily intake without concern if the extra comes from food, while a single supplement dose above 350 mg may cause diarrhoea. Since plenty of products on the shelf deliver 300 mg or more of elemental magnesium per dose, this is a practical point rather than a technicality.

Add up everything you take. Magnesium appears in multivitamins, sleep formulas, muscle and cramp products and some electrolyte preparations, and the total is what matters.

When to take magnesium, and is it safe every night?

No particular timing has been established as better, including taking it at night. Products intended for evening use are formulated that way for convenience rather than because a trial showed that timing works better.

Follow the directions on the individual product, because the amount per dose and the recommended frequency differ between brands.

Diarrhoea, nausea or abdominal cramping are the usual signs of taking too much, and they are a reason to reduce the dose or change the form rather than to push through.

Nightly use over a long period deserves periodic review. If a supplement has become a permanent fixture and sleep is still poor, that is a signal to look at why, not to increase the dose or add another product.

Magnesium, medicines and kidney health

Healthdirect lists kidney problems, and long-term use of some medicines such as diuretics or reflux medicines, among the situations where magnesium levels can be affected.2 Both are reasons to check with a doctor or pharmacist before starting a magnesium supplement.

Reduced kidney function is the most important of these, because the kidneys are how the body clears excess magnesium. Anyone with chronic kidney disease should not start a magnesium supplement without medical advice.

Bring a current list of your prescription medicines, over-the-counter products and supplements to a pharmacist review, rather than asking about the magnesium product in isolation. The interaction that matters is often between two things you did not think of as related.

Pregnancy and breastfeeding, type 2 diabetes and digestive conditions such as Crohn's disease are further reasons to get individual advice before adding a supplement.

When sleep or anxiety needs professional support

Healthdirect recommends speaking with a doctor when insomnia continues or interferes with daily functioning, and assessment can consider sleep habits, medical conditions, mental health, medicines and other sleep disorders.7

Cognitive behavioural therapy for insomnia is an established approach for persistent insomnia.7 Loud snoring, witnessed pauses in breathing, significant daytime sleepiness or falling asleep during activities such as driving need medical attention rather than another supplement.

Anxiety that is affecting your work, relationships or daily life deserves proper support, and a supplement is not a substitute for it. A GP can discuss options including psychological therapy, and can also check whether something else is contributing. Psychologists and other mental health professionals can be accessed through a GP referral.

Do not stop or change a prescribed medicine, including an antidepressant or a sleep medicine, in order to try magnesium. Any change to prescribed treatment is a conversation with the prescriber.

Magnesium has a genuine role when dietary intake is low or a deficiency has been identified, and it may help some people fall asleep a little faster. What it does not do is treat insomnia or an anxiety disorder, and no form on the shelf changes that.

Frequently Asked Questions

What type of magnesium is best for sleep?

No form has been shown to work better than another for sleep, including magnesium glycinate. The forms differ in absorption and in how likely they are to cause a laxative effect, but no trial establishes one as superior for sleep specifically. Compare products by their elemental magnesium per dose and keep supplemental intake within the 350 mg daily upper level.3

How much magnesium should I take before bed?

There is no established bedtime dose. Follow the directions on the individual product, and keep supplemental magnesium within the upper level of 350 mg a day, which applies to supplements rather than to magnesium from food. Diarrhoea, nausea or cramping are signs of taking too much. Studies used a range of doses, so no single figure can be taken from the research.

Can magnesium help with anxiety?

A systematic review of 18 studies found suggestive but poor-quality evidence for an effect on subjective anxiety, and every study recruited people already vulnerable to anxiety. Magnesium had no effect on postpartum anxiety.5 Several trials used magnesium combined with vitamin B6 rather than magnesium alone, so the results cannot be attributed to magnesium by itself. Anxiety affecting daily life should be discussed with a GP.

What happens if you take magnesium every day?

Daily use can be appropriate when dietary intake is low, and magnesium is needed for healthy muscles, nerves, bones and blood sugar.1 The main issue with ongoing use is total intake: keep supplemental magnesium within 350 mg a day and add up every product that contains it.3 Check labels for vitamin B6 as well, and review periodically whether you still need the supplement.

Can you take magnesium and melatonin together?

Melatonin is a scheduled medicine in Australia, which is different from countries where it is sold as a supplement. Under the Poisons Standard it is prescription only, except for modified release tablets containing 2 mg or less, supplied as monotherapy for the short-term treatment of primary insomnia in adults aged 55 or over, in packs of not more than 30 tablets.8 If melatonin has been prescribed or supplied to you, ask the prescribing doctor or the pharmacist who supplied it before adding magnesium or any other sleep product, so your full list can be checked together.

References

  1. Healthdirect Australia. Magnesium and your health.
  2. Healthdirect Australia. Magnesium deficiency.
  3. National Health and Medical Research Council. Nutrient Reference Values for Australia and New Zealand: magnesium. Eat For Health.
  4. Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complement Med Ther. 2021;21:125. doi:10.1186/s12906-021-03297-z. https://pubmed.ncbi.nlm.nih.gov/33865376/
  5. Boyle NB, Lawton C, Dye L. The effects of magnesium supplementation on subjective anxiety and stress: a systematic review. Nutrients. 2017;9(5):429. doi:10.3390/nu9050429. https://pubmed.ncbi.nlm.nih.gov/28445426/
  6. Therapeutic Goods Administration. Peripheral neuropathy with supplementary vitamin B6 (pyridoxine).
  7. Healthdirect Australia. Insomnia: causes, symptoms and different types.
  8. Therapeutic Goods Administration. Notice of final decision to amend the current Poisons Standard in relation to melatonin.

Medical Disclaimer

This article provides general information and does not replace advice from a doctor, pharmacist or other qualified health professional. Always read the product label and follow the directions for use. Magnesium supplements are not suitable for everyone, particularly people with reduced kidney function, and can be affected by some medicines. If sleep problems, anxiety or other symptoms persist, worsen or concern you, seek professional advice. Supplements should not replace a balanced diet or treatment for a diagnosed condition. In an emergency, call 000. For suspected poisoning in Australia, call the Poisons Information Centre on 13 11 26.

This article is general information, not personal medical advice. Always read the label and follow the directions for use.