
You’re buying groceries when you remember a post promising that magnesium will lower cortisol and help you sleep. Would adding beans to dinner help? What about the supplement everyone seems to recommend?
In this article
Magnesium supports everyday body functions. You can get it from familiar foods, while keeping the evidence for supplements in perspective. Research on blood sugar, cortisol, and sleep asks different questions, so a finding about one does not settle the others.
What magnesium does
The NIH Office of Dietary Supplements (ODS) explains that magnesium helps with muscle and nerve function, blood sugar regulation, and making protein, bone, and DNA. Think of it as one of many helpers in a busy workplace.
Its role in normal biology does not mean taking extra will improve a hormone level or explain a symptom. That distinction is useful when a product turns a nutrient’s job into a treatment promise.
Magnesium and blood sugar
People who consume more magnesium tend to have a lower risk of type 2 diabetes. The ODS evidence review notes that these observations can also reflect other features of diet and lifestyle. They cannot show that a supplement prevents diabetes.
Trials of supplemental magnesium for blood sugar control in people with diabetes have had conflicting results. ODS reports insufficient evidence for routine use to improve glucose control. Correcting an identified deficiency is a separate clinical question. Our guide to insulin resistance and prediabetes explains those terms.
What the cortisol research measured
A study of 49 adults aged 45–70 with overweight found lower cortisol excretion in 24-hour urine samples after magnesium citrate compared with placebo. The researchers analyzed cortisol after the original trial had been designed, making this a post-hoc analysis.
They described the findings as exploratory and hypothesis-generating. They also could not separate a possible magnesium effect from a possible citrate effect. This research helps investigate how cortisol is processed; it does not establish a treatment for everyday stress or a social-media diagnosis of “high cortisol.” See our adrenal gland guide for the wider context.
Can magnesium help sleep?
NCCIH’s sleep overview describes limited, low-quality earlier research on magnesium for insomnia. A 2025 placebo-controlled trial adds a more recent finding: among 155 adults reporting poor sleep, magnesium bisglycinate produced a small improvement in an insomnia questionnaire over four weeks.
The trial relied on self-reported sleep, rather than objective sleep measurements. It did not show significant differences in the other psychological outcomes, and it did not measure a cortisol change. It therefore cannot explain the sleep finding as a cortisol-lowering effect or show that every magnesium product works the same way.
If sleep problems persist, ask about their cause and treatments such as cognitive behavioral therapy for insomnia (CBT-I), which NCCIH identifies as strongly recommended. Our hormones and sleep guide covers nighttime waking more broadly.
Everyday foods that contribute magnesium
ODS lists beans and lentils, nuts, seeds, whole grains, leafy greens, milk, and yogurt among food sources. For example, you might stir beans into soup, add seeds to yogurt, or choose whole-grain bread with lunch. Pick foods that fit your preferences and any allergies.
What you can do
- Start with the question. Is your concern a limited diet, persistent poor sleep, blood sugar, or something else? Bring that concern to your appointment rather than assuming one supplement answers all four.
- Bring the label. The ODS safety and interaction sections note that supplemental magnesium can cause diarrhea, nausea, and cramps; excessive amounts can be dangerous. Kidney impairment increases toxicity risk.
- Review your medicines. Magnesium can interfere with absorption of certain antibiotics and osteoporosis medicines. Some diuretics and long-term acid-reflux medicines can affect magnesium levels. Ask your pharmacist about your exact products and instructions; don’t change prescribed medicines on your own.
- Keep the rest of your care. A supplement is not a substitute for a diabetes treatment plan or an assessment of ongoing insomnia.
When to talk to a doctor
Ask for advice if you have kidney disease, a digestive condition, diabetes, or medicines that may affect magnesium. ODS identifies digestive diseases, type 2 diabetes, long-term heavy alcohol use, and older age as factors that can increase the chance of inadequate magnesium.
Persistent weakness, cramps, or poor sleep deserve a conversation about possible causes. Those symptoms alone do not diagnose a deficiency. Bring your food concerns, medicines, and supplements so a clinician can decide what assessment would help.
Frequently asked questions
Does magnesium lower cortisol?
A small exploratory trial analysis found a change in urinary cortisol. That does not establish magnesium as a treatment for stress or prove that your symptoms come from high cortisol.
Can magnesium supplements treat insulin resistance?
The evidence does not support a general treatment promise. Discuss an identified deficiency or a specific clinical reason with your care team.
Which magnesium is best for sleep?
One trial of bisglycinate cannot establish the best product for everyone or replace an assessment of persistent sleep problems. Ask about evidence, safety, and the cause of your symptoms before choosing a supplement.
What foods contain magnesium?
Options include beans, lentils, nuts, seeds, whole grains, leafy greens, and milk or yogurt. These can contribute to a varied diet without turning meals into a hormone-treatment plan.



