Coffee is often the first and last thing in a perimenopausal woman’s day, and it is worth understanding how caffeine intake interacts with magnesium, a mineral this site covers extensively for sleep and mood [2]. The relationship appears to run mainly through the kidneys, but the evidence is thin: one older study measured it, and a low-quality review also says caffeine may interfere with mineral absorption [3].
This article may contain affiliate links. If you purchase through these links, we may earn a commission at no additional cost to you.
How Caffeine Affects Magnesium in the Body
Caffeine has a mild diuretic effect, increasing urine output in the hours after consumption. Research measuring urinary mineral excretion after caffeine intake found significant increases in magnesium loss alongside calcium, sodium, and other minerals, driven largely by reduced reabsorption of magnesium in the kidneys rather than simply more urine volume [1].
The one study cited here measured urinary losses in healthy young women, and it does not show how the effect changes with the amount of caffeine. A low-quality review says caffeine can interfere with absorption of minerals including magnesium, but it gives no data, so absorption is not ruled out [3].
Does This Matter for Someone Taking Magnesium Glycinate?
For most people with a normal coffee habit, one to three cups daily, the added urinary magnesium loss is small relative to total intake and is generally offset by adequate dietary and supplemental magnesium. It becomes more relevant for someone who already runs low on magnesium from diet, drinks caffeine heavily throughout the day, and is also dealing with perimenopausal symptoms like poor sleep or muscle cramps that overlap with magnesium deficiency symptoms.
Research note: NHANES 2013-2016 data cited by NIH ODS show 48% of Americans of all ages get less magnesium from food and beverages than their Estimated Average Requirement; adult men 71+ and adolescents are most likely to have low intakes [4].
Spacing magnesium supplementation away from a large caffeine dose is a reasonable, low-effort adjustment, though there is no requirement to eliminate coffee to make magnesium supplementation effective.
Practical Takeaways
If sleep is the primary reason for taking magnesium glycinate, consider that afternoon or evening caffeine, separate from the magnesium and excretion question entirely, is already a well-established disruptor of sleep quality on its own. Addressing caffeine timing may improve sleep outcomes through that pathway even more than through the magnesium excretion mechanism discussed here.
For most women with a typical coffee habit and a reasonable magnesium intake from diet or supplementation, caffeine’s effect on magnesium status is a minor factor rather than a primary driver of deficiency.
Frequently Asked Questions
Does caffeine cancel out my magnesium supplement?
No. The evidence is thin, but the main documented effect is a modest rise in urinary magnesium loss, and nothing cited here shows that caffeine makes supplementation ineffective [3].
Should I take magnesium and coffee at different times of day?
Spacing them out is a reasonable, low-effort precaution, particularly for heavy coffee drinkers, though it is not strictly necessary for most people.
Does decaf coffee have the same effect on magnesium?
No study cited here compares decaf with regular coffee for urinary magnesium loss, so how much difference decaf makes is unclear.
How much coffee is too much when trying to maintain magnesium levels?
There is no single threshold established in the research. Moderate intake, generally considered up to about 400 mg of caffeine per day for most healthy adults, is a reasonable general guideline, though individual tolerance and health history vary.

References
- The effect of dietary caffeine on urinary excretion of calcium, magnesium, sodium and potassium in healthy young females. Nutrition Research, 1984
- Garrison SR et al. Magnesium for skeletal muscle cramps. The Cochrane database of systematic reviews (2020). PMID 32956536
- Tsedeke Wolde Effects of caffeine on health and nutrition: A Review. Journals & Books Hosting (International Knowledge Sharing Platform) (2014). source
- NIH Office of Dietary Supplements Magnesium: Fact Sheet for Health Professionals. NIH Office of Dietary Supplements (2026). source
These statements have not been evaluated by the FDA. This product is not intended to diagnose, treat, cure, or prevent any disease.
These statements have not been evaluated by the Food and Drug Administration. This information is not intended to diagnose, treat, cure, or prevent any disease. Content is for informational purposes only and is not medical advice; consult a qualified healthcare provider before starting any supplement. As an Amazon Associate we earn from qualifying purchases.


