Medication & supplements

Side Effects of Magnesium: What to Watch For

By Angus Munro, Clinical Psychologist (AHPRA PSY0001626434) · Last clinically reviewed 2026-07-10 · 9 min read

The most common side effects of magnesium supplements are gastrointestinal: loose stools, diarrhoea, stomach cramping and nausea. They are usually dose-dependent, and they depend heavily on the form you take, which is why the same milligram figure can sit quietly in one product and send you to the bathroom in another. Serious effects are rare in healthy people, but they are real if your kidneys aren't clearing magnesium well, because that is when it can build up in the blood.

If you found this page, you are probably taking magnesium for sleep, or thinking about it, and something has given you pause. Let me walk through what actually happens in the body, what is genuinely worth watching for, and then a harder question most supplement pages skip: whether the side effects are the real issue at all.

The most common side effects of magnesium

Magnesium is a mineral and an electrolyte, not a sedative. Most of what people call a side effect comes from a simple fact: magnesium that isn't absorbed in the gut pulls water in with it. That is the whole mechanism behind the laxative reputation. It is also why magnesium is used, in other settings, precisely to relieve constipation.

So the usual complaints are predictable:

  • Loose stools or outright diarrhoea
  • Abdominal cramping or bloating
  • Nausea, especially on an empty stomach

Two things drive how much of this you get. The first is dose: more unabsorbed magnesium, more gut effect. The second is form. Magnesium oxide and magnesium citrate are poorly absorbed and the most likely to loosen things up. Gentler, better-absorbed forms like magnesium bisglycinate tend to sit more quietly in the gut. I am not going to hand you a dose here, because dosing is exactly the sort of decision that belongs with your GP or pharmacist, who can weigh your kidneys, your other medications, and everything else magnesium touches.

For most healthy adults, the gut effects are the beginning and the end of the story. Annoying, not dangerous.

When magnesium side effects are more than a nuisance

There is a smaller set of situations where magnesium is worth genuine caution, and they are worth naming plainly so you don't spend worry on the wrong thing.

The main one is kidney function. Your kidneys are what clear excess magnesium. If they are not working well, magnesium can accumulate and blood levels can climb, a state called hypermagnesaemia. At that point the effects change character: low blood pressure, muscle weakness, flushing, drowsiness, and in severe cases changes to heart rhythm. This is uncommon, and it is very unlikely from a normal supplement in someone with healthy kidneys. But if you have any degree of kidney impairment, this is not a supplement to self-manage. Talk to your doctor before you take it at all.

Magnesium also interferes with the absorption of several medications, including some antibiotics, thyroid tablets, and osteoporosis medication. The issue is usually timing rather than danger, but "usually" is doing real work in that sentence, which is why it is a pharmacist conversation and not a guess.

None of this is a diagnosis, and a web page cannot examine you. If you are getting palpitations, muscle weakness, or stomach upset that won't settle, that is a reason to get checked, not a reason to push through. The point of naming red flags is care, not alarm. Most people reading this will never meet one.

Do the side effects of magnesium supplements outweigh the benefit for sleep?

Here is where I want to shift the question. Most people worried about the side effects of magnesium supplements are quietly asking something underneath it: is this thing even doing enough to be worth the trade?

I will give it to you straight, because you deserve that. The research on magnesium specifically as a treatment for insomnia is thin and mixed. It is mostly small studies, often in older adults or people who were already low in magnesium, and it does not come close to the standard we hold real insomnia treatments to. That is not the same as saying it does nothing. It is saying we do not have strong evidence that it does much, for most people, for chronic insomnia.

You can see the shape of this in the guidelines. The American Academy of Sleep Medicine reviewed the common over-the-counter sleep options, diphenhydramine, valerian, tryptophan and melatonin, and recommended against all of them for chronic insomnia (Sateia et al. 2017). Magnesium didn't even feature among the agents they weighed. That is not proof it is useless. It is a signal of how little dedicated, high-quality evidence exists.

And here is the part worth sitting with. Even the prescription sleeping tablets, with far more research behind them than any supplement, deliver less than the marketing implies. When researchers pooled the trial data submitted to the FDA on the newer sleeping tablets, those drugs helped people fall asleep roughly twenty minutes faster than placebo, and much of even that was the placebo response (Huedo-Medina et al. 2012). In older adults, sedative hypnotics gave only a small gain in sleep quality while roughly doubling to quadrupling side effects such as next-day grogginess and unsteadiness (Glass et al. 2005). The compounds with the most evidence still carry real trade-offs for modest benefit.

So the honest framing is not "magnesium is dangerous." For most people it is safe, and the side effects are manageable. The honest framing is that a supplement is being asked to do a job it was probably never going to do, and the side effects are a distraction from that larger truth.

Why a supplement was never going to fix the loop

Chronic insomnia, for most of the people I work with, is not a magnesium deficiency. It is a self-maintaining loop, and the engine of that loop is arousal.

Here is the cruel mechanism. When you can't sleep, your brain does not treat "I'm awake" as neutral. It treats it as a problem to solve, and it switches on the same alertness system it would use for a genuine threat. That alertness is the opposite of sleep. So the harder you work on the night, the more activated you become, and the further sleep retreats. It is like drinking seawater when you are thirsty. Every sip feels like it should help. Every sip makes it worse.

A supplement lands right in the middle of that pattern and, for many people, becomes another sip. Not because magnesium is bad, but because reaching for one more thing to fix tonight keeps the whole system switched on. You take the tablet, then you lie there monitoring whether it is working, and the monitoring is the arousal, and the arousal is the insomnia. The tool becomes part of the problem it was meant to solve.

This is also why so much sleep advice fails you. It hands you one tool and expects it to work at every level of activation. A calm-minute strategy is useless the moment you are already wired. The Insomnia Reset program is built around an arousal-matched approach: it matches the tool to how activated you already are, rather than pretending one trick fits every state. That is a very different thing from a bottle on the bedside table.

What actually has the evidence

The most effective treatment for chronic insomnia is not a substance at all. It is cognitive behavioural therapy for insomnia, and the major guidelines name it first-line, ahead of medication (Riemann et al. 2023). It works on the loop itself, the arousal, the effort, and the beliefs that keep the system switched on, rather than sedating you through the night.

Insomnia Reset is built on that evidence base and then adapts it. Standard programs, for instance, ask you to keep a nightly sleep diary. I don't, because for a wired, over-monitoring brain a nightly log tends to feed the very hypervigilance we are trying to unwind. The foundation is the same evidence; the delivery is refined for the anxious, effortful sleeper, because that is who actually ends up buying magnesium at 11pm.

If part of why you reached for magnesium is that you are trying to lean off a prescription sleeping tablet, that is a worthwhile goal, and a conversation to have with your prescriber rather than something to improvise alone. The evidence is encouraging: a slow, supervised taper works best when paired with the behavioural skills that treat the underlying insomnia (Pottie et al. 2018; Morin et al. 2004). The substance comes down while the actual skill goes up.

You do not need to add magnesium, subtract magnesium, or make any supplement decision at all today to start on the part that matters. If you want a clearer read on what is actually driving your sleep, the Sleep Clarity quiz is a sound place to begin. It won't diagnose anything. It just shows you where the loop is running.

Frequently asked questions

Is it safe to take magnesium every night for sleep?

For most healthy adults, nightly magnesium at sensible amounts is generally well tolerated, with gut upset being the usual limiting factor. The real cautions are reduced kidney function and interactions with other medications, which is why the dose and the "every night" question are best settled with your GP or pharmacist rather than a blog. Safe and helpful are also two different questions: a supplement can be perfectly safe and still not be moving your sleep much.

Which form of magnesium causes the fewest side effects?

Broadly, the poorly absorbed forms, magnesium oxide and citrate, are the most likely to cause loose stools, while better-absorbed forms such as bisglycinate tend to be gentler on the gut. That is a tolerability point, not an efficacy one. Gentler on the stomach does not mean stronger for sleep, and I would not choose a supplement expecting it to treat chronic insomnia on its own.

Can magnesium cause anxiety or heart palpitations?

Magnesium is more often discussed for the opposite reason, but any physical sensation you go looking for at night tends to get amplified by the attention itself. If you are getting genuine palpitations, that is worth having checked by your doctor rather than pinning on a supplement. Don't diagnose it from a website, this one included.

How do I know if magnesium is actually helping my sleep?

This is harder than it sounds, and it is a trap I would gently steer you away from. The more closely you track and grade each night to judge whether the tablet "worked," the more you feed the monitoring that keeps you awake. I don't recommend turning your sleep into a nightly scoring exercise. The better question is not "did the supplement work last night" but "is the overall pattern loosening over weeks."

Should I take magnesium if I am already on a prescription sleeping tablet?

Combining anything with a prescription sleeping tablet is a prescriber question, not a supplement-aisle one, because of both interactions and sedation stacking. If your longer goal is to come off the tablet, that is a legitimate plan to raise with your doctor, and the evidence favours a slow, supervised taper supported by the behavioural skills that treat insomnia at its root (Pottie et al. 2018).

Frequently asked questions

Is it safe to take magnesium every night for sleep?

For most healthy adults, nightly magnesium at sensible amounts is generally well tolerated, with gut upset being the usual limiting factor. The real cautions are reduced kidney function and interactions with other medications, which is why the dose and the "every night" question are best settled with your GP or pharmacist rather than a blog. Safe and helpful are also two different questions: a supplement can be perfectly safe and still not be moving your sleep much.

Which form of magnesium causes the fewest side effects?

Broadly, the poorly absorbed forms, magnesium oxide and citrate, are the most likely to cause loose stools, while better-absorbed forms such as bisglycinate tend to be gentler on the gut. That is a tolerability point, not an efficacy one. Gentler on the stomach does not mean stronger for sleep, and I would not choose a supplement expecting it to treat chronic insomnia on its own.

Can magnesium cause anxiety or heart palpitations?

Magnesium is more often discussed for the opposite reason, but any physical sensation you go looking for at night tends to get amplified by the attention itself. If you are getting genuine palpitations, that is worth having checked by your doctor rather than pinning on a supplement. Don't diagnose it from a website, this one included.

How do I know if magnesium is actually helping my sleep?

This is harder than it sounds, and it is a trap I would gently steer you away from. The more closely you track and grade each night to judge whether the tablet "worked," the more you feed the monitoring that keeps you awake. I don't recommend turning your sleep into a nightly scoring exercise. The better question is not "did the supplement work last night" but "is the overall pattern loosening over weeks."

Should I take magnesium if I am already on a prescription sleeping tablet?

Combining anything with a prescription sleeping tablet is a prescriber question, not a supplement-aisle one, because of both interactions and sedation stacking. If your longer goal is to come off the tablet, that is a legitimate plan to raise with your doctor, and the evidence favours a slow, supervised taper supported by the behavioural skills that treat insomnia at its root (Pottie et al. 2018).

This article is general information written by a clinical psychologist. It is not a substitute for individual assessment or treatment. If sleep problems are affecting your health or daily life, speak with your GP or a registered psychologist.
If you need support now. If sleep loss comes with thoughts of harming yourself, or you feel you can't keep yourself safe, please reach out now — in Australia, Lifeline 13 11 14 or 13YARN 13 92 76; in the US, 988; in the UK, Samaritans 116 123. If you are in immediate danger, call your local emergency number.

Work on the mechanism, not another tip

Insomnia Reset is a structured, psychologist-designed program for exactly this pattern. If you're ready to work on the mechanism rather than chase another tip, that's what it's for.

Explore Insomnia Reset →