You bought magnesium for a reason — sleep, cramps, a gap your diet wasn't filling. The label promised a mineral your body needed. What it delivered, within a day or two, was diarrhea.
But the explanation most people settle on — that the supplement irritated their stomach, the way aspirin or spicy food might — doesn't match the chemistry. Nearly every suggestion built on that idea (take less, try a coated tablet, eat it with food) follows from the same wrong model.
Why does magnesium give you diarrhea
Magnesium oxide — the form in most budget supplements and store-brand bottles — absorbs poorly. A large fraction of each dose never enters the bloodstream. It stays in the intestine as unabsorbed salt, and unabsorbed salt does what physics predicts: it draws water across the gut wall by osmosis. More water flooding into the intestine means looser stools. At a high enough dose, it means diarrhea. Not because anything is inflamed or irritated. Because the salt that never absorbed is pulling water exactly where you don't want it.
How consistent is that effect? In one clinical trial, at 729 milligrams per day of magnesium oxide, every single participant developed soft stools — all twelve, without exception. The finding surfaced inside a broader meta-analysis of magnesium and sleep. The diarrhea was a side observation, not the main question, which makes the unanimity harder to dismiss.
Magnesium causes diarrhea through osmotic laxation, not stomach irritation. Poorly absorbed forms like magnesium oxide leave unabsorbed salt in the intestine, which draws water across the gut wall. In one trial, 100% of participants taking 729 mg/day of magnesium oxide developed soft stools. Better-absorbed forms produce less osmotic effect.
— Held 2002 via Mah et al. 2021 · BMC Complementary Medicine and Therapies · n=12
That chemistry should sound familiar. Magnesium hydroxide — a close relative of the oxide in your supplement — is the active ingredient in Phillips' Milk of Magnesia, a product sold on purpose as a laxative for over a century. One is marketed to relieve constipation. The other is marketed to support sleep. The difference is intent and dose, not chemistry.
The product on the laxative shelf and the pill on your nightstand share the same osmotic mechanism.
Not every magnesium compound pulls water into the gut this way. Forms that absorb well leave less unabsorbed salt in the intestine, which means less osmotic draw and fewer GI symptoms. The NIH Office of Dietary Supplements names oxide, carbonate, chloride, and gluconate as the forms most commonly linked to diarrhea. What decides whether magnesium disrupts your gut is not the mineral itself — it's the compound the mineral is bonded to.
Your body didn't overreact. It did exactly what the chemistry predicts when a poorly absorbed salt sits in the intestine long enough. What changes the outcome isn't avoiding magnesium — it's choosing a form that absorbs well enough to skip the osmotic effect entirely.