Dr. Hyman fixed migraines with magnesium. Here's what he didn't mention: it also drives free testosterone — and most men are deficient.
On a recent episode of The Dr. Hyman Show, Dr. Hyman described resolving a Mayo Clinic resident's intractable migraines simply by correcting her magnesium deficiency. What the episode didn't cover: magnesium is also a critical cofactor for testosterone production and free testosterone availability — and it's one of the most common deficiencies PMM identifies on the Performance+ panel. If your testosterone optimization isn't working as well as it should, this mineral may be why.
Dr. Hyman's point stands: magnesium deficiency is real, clinically significant, and routinely missed. His patient, a Mayo-trained radiation oncologist on narcotics for intractable migraines, had her symptoms resolve once magnesium was corrected. That is not a fringe case. An estimated 48% of Americans consume less than the recommended daily amount of magnesium, according to King et al., *American Journal of Clinical Nutrition*, 2005.
What the episode never mentioned: magnesium is also a direct driver of testosterone availability in men. The neurology angle is accurate. The endocrinology angle is the part most men, and most podcasts, miss entirely.
Magnesium functions as a cofactor in more than 300 enzymatic reactions, including several steps in steroidogenesis, the biochemical pathway your body uses to manufacture testosterone. A deficiency does not just affect your head. It affects what shows up on your hormone panel.
"Magnesium is one of the markers we see deficient most consistently on the Performance+ panel," says Dr. Jacob Egbert, PMM's medical director. "Men come in focused on their testosterone number, and the magnesium is quietly undermining both their T production and their sleep, two things that compound each other fast."
The mechanism behind that clinical observation is more specific than most people realize.
Most men who are deficient in magnesium have no idea, because the standard blood test used to check it, serum magnesium, measures the wrong thing. Only about 1% of total body magnesium circulates in the blood; the other 99% is stored in bone, muscle, and soft tissue. Serum levels can look perfectly normal while intracellular stores are significantly depleted, as Elin documented in *Magnesium Research*, 2010.
That measurement gap means a physician can run a standard metabolic panel, see a serum magnesium of 2.0 mg/dL, and tell you everything looks fine, while your cells are running low on the mineral that drives over 300 enzymatic reactions.
Serum magnesium measures what is floating in your plasma, not what is inside your cells where the mineral actually does its work. It is not included in most standard panels, including PMM's $49 Foundation panel or the $99 Performance panel. Magnesium is a Performance+ marker, available on the $199 Performance+ panel. That is not a flaw in panel design; it reflects the reality that magnesium is a specialized test most clinicians never order, which is exactly why deficiency goes undetected.
Even with a reasonably clean diet, hitting the recommended daily allowance for magnesium is harder than it used to be. The RDA for adult men is 400–420 mg/day. Average U.S. intake, per NHANES survey data, sits around 330 mg/day, a consistent shortfall before accounting for anything that accelerates loss.
Several common factors drive magnesium out of the body faster than diet replaces it:
The result is a widespread, invisible deficit that a routine blood panel won't catch, and one that has direct downstream consequences for testosterone.
Magnesium raises free testosterone by competing with sex hormone-binding globulin (SHBG) for binding sites on testosterone molecules. Less SHBG binding means more testosterone remains biologically active. This is not a theoretical mechanism; it shows up in human data, and the effect is large enough to matter clinically.
SHBG binds roughly 60–70% of circulating testosterone and renders it biologically inactive, meaning it cannot reach androgen receptors or drive the effects you actually feel: libido, muscle protein synthesis, morning energy. Magnesium competes with SHBG at the same binding site on the testosterone molecule, effectively reducing SHBG's capacity to sequester free T. The research establishing this mechanism comes from Excoffon et al., *Magnesium Research*, 2009.
Put differently: a man can have a total testosterone reading that looks acceptable on paper while his free testosterone, the fraction his body can actually use, is functionally low, and inadequate magnesium is one reason why.
This is the same dynamic that makes SHBG-aware clinicians skeptical of total T in isolation. A man spending months adjusting his TRT dose trying to fix low libido and flat energy may be chasing the wrong variable if his magnesium is depleted and his SHBG is elevated as a result.
The clearest human evidence comes from Maggio et al., *Journal of the American Geriatrics Society*, 2011, which examined 399 men aged 65 and older. Serum magnesium was positively and independently associated with both total and free testosterone. Men in the highest magnesium quartile had significantly higher free testosterone than men in the lowest quartile, after controlling for age, BMI, and physical activity.
The effect is not limited to older men. A 2010 study by Cinar et al., *Biological Trace Element Research*, 2010 found that four weeks of magnesium supplementation raised free testosterone by approximately 24% in athletes compared to sedentary controls. The athletes supplementing magnesium also outperformed controls on the testosterone response to exercise, suggesting magnesium amplifies the hormonal signal from training you are already doing.
The mechanism runs deeper than SHBG competition alone. Magnesium is a required cofactor in the steroidogenesis pathway, the enzymatic chain that converts cholesterol into testosterone in the Leydig cells of the testes. Without adequate magnesium, the biochemical machinery of testosterone production runs below capacity regardless of what luteinizing hormone (LH) is signaling.
| Pathway | Magnesium's Role | What You Feel When It's Low |
|---|---|---|
| SHBG competition | Frees bound testosterone | Low libido despite "normal" total T |
| Steroidogenesis | Cofactor for T synthesis enzymes | Blunted response to training and sleep |
| Cortisol regulation | Modulates HPA axis output | Elevated stress response, suppressed LH |
| Sleep architecture | Supports slow-wave sleep depth | Poor recovery, morning fatigue |
Magnesium's role in cortisol regulation and sleep quality compounds the testosterone effect, and that is where the argument gets more actionable.
Magnesium improves testosterone not just at the binding level; it works upstream, through sleep and cortisol. Fix those two variables and your pituitary gets a cleaner signal to produce testosterone in the first place. The evidence behind it is specific enough to act on.
Start with sleep. Magnesium activates GABA (gamma-aminobutyric acid) receptors, the brain's primary inhibitory neurotransmitter system. When magnesium is low, GABA signaling weakens, and the nervous system stays in a higher-arousal state at night. The result is less slow-wave sleep, the deep, restorative stage where the largest nightly pulse of growth hormone releases and where the body does most of its testosterone-supportive repair. Held et al., *Pharmacopsychiatry*, 2002 documented this correlation directly. A 2012 randomized controlled trial by Abbasi et al., *Journal of Research in Medical Sciences*, 2012 found that magnesium supplementation improved sleep efficiency scores by roughly 13% versus placebo in elderly men, a meaningful gain for a population already losing testosterone at 1–2% per year (Harman et al., *JCEM*, 2001).
The cortisol pathway is the other half of this. Cortisol suppresses luteinizing hormone (LH) pulse amplitude, which means your testes receive a weaker signal to produce testosterone; you feel it as the afternoon energy drop arriving earlier and gym recovery stretching longer than it should. Chronic magnesium insufficiency is associated with elevated baseline cortisol through dysregulation of the HPA (hypothalamic-pituitary-adrenal) axis, a relationship documented by Golf et al., *Magnesium Research*, 1998.
NOT SURE WHERE TO START?
Take our 2-minute hormone & metabolism quiz to see exactly where you stand. Or skip ahead — a $49 lab panel gives you the numbers, a free hormone screen gives you a plan.
Put differently: poor sleep and elevated cortisol are two of the most common reasons TRT patients plateau, and both trace back to a mineral most standard panels never measure.
The most bioavailable form for sleep and cortisol regulation is magnesium glycinate, taken at 300–400 mg roughly 30–60 minutes before bed. It crosses into the central nervous system efficiently without the laxative effect of magnesium oxide or citrate at higher doses.
Here is where the deficiency becomes a clinical blind spot for most men getting hormone panels:
If you have had your testosterone checked but never had your magnesium measured, you are missing a variable that affects both how much free testosterone circulates and how well your body produces it overnight. The free Hormone and Metabolism Quiz can help clarify whether your symptom picture points toward a deficiency worth testing.
Magnesium is one of the most commonly flagged deficiencies on PMM's Performance+ panel. Dr. Jacob Egbert, PMM's medical director, sees it consistently: "In men who come in with suboptimal free testosterone and otherwise unremarkable labs, magnesium is the first micronutrient I look at. It's underappreciated how often that number is low and how directly it connects to what they're feeling."
The numbers back that up. In PMM's clinical experience, more than half of men who run the Performance+ panel for the first time come back with serum magnesium below the functional optimal range of 2.0–2.5 mg/dL, even when their result falls within the standard lab "normal" of 1.7–2.2 mg/dL. That gap matters. Standard reference ranges are built to flag frank deficiency; the Primal Health Playbook uses tighter functional optimal ranges because "not deficient" and "optimized" are different targets.
A man can have a serum magnesium of 1.9 mg/dL, get a green checkmark on a conventional lab report, and still be running low enough to suppress free testosterone and fragment his sleep.
This is also why magnesium is not on the $49 Foundation panel. The Foundation panel covers the hormonal and metabolic markers that answer the first question: is something wrong with your testosterone axis? Magnesium, Vitamin D, B12, DHEA-S, ApoB, Insulin, and IGF-1 are Performance+ markers because they answer the second question: what's driving it, and what else is pulling your optimization ceiling down?
Here is what the Performance+ panel includes beyond the Foundation tier:
| Marker | Why It Matters for Testosterone Optimization |
|---|---|
| Magnesium | SHBG competition, sleep quality, cortisol regulation |
| Vitamin D | Steroidogenesis cofactor; low D correlates with low total T |
| DHEA-S | Adrenal androgen precursor; declines with age and chronic stress |
| IGF-1 | Growth hormone proxy; tracks anabolic environment |
| ApoB | Cardiovascular risk; relevant when TRT is on the table |
| Insulin | Insulin resistance drives SHBG elevation and suppresses free T |
For men who have already run a Foundation panel and know their testosterone is borderline, the Performance+ panel is the logical next step. It is the difference between knowing your T is low and knowing why it is low.
The short answer: 300–400 mg of elemental magnesium per day, as magnesium glycinate or magnesium malate, split between post-workout and 30–60 minutes before bed. Form determines how much your body actually absorbs. Timing determines which benefits you get.
Magnesium oxide is the version filling most pharmacy shelves, and nearly useless. Bioavailability sits at roughly 4%, meaning a 400 mg tablet delivers about 16 mg of absorbable magnesium (Schuette et al., *JPEN*, 1994). At that absorption rate, you will not move serum levels, SHBG binding, or sleep architecture in any measurable direction.
Magnesium glycinate and magnesium malate are chelated forms with substantially higher bioavailability and minimal GI disturbance. Glycinate is the better choice for sleep and cortisol regulation; malate is often preferred for energy metabolism and muscle recovery.
| Form | Bioavailability | Best For | GI Tolerance |
|---|---|---|---|
| Magnesium glycinate | High | Sleep, stress, SHBG | Excellent |
| Magnesium malate | High | Recovery, energy | Excellent |
| Magnesium citrate | Moderate | General use | Moderate |
| Magnesium oxide | ~4% | Not recommended | Poor |
The Cinar et al. study used 10 mg/kg/day of magnesium sulfate, roughly 700–800 mg for a 170 lb man, but that was a controlled intervention in athletes with documented deficiency. For most men starting from a chronic, subclinical deficit, 300–400 mg of elemental magnesium per day from a high-bioavailability form is the appropriate clinical target.
Note the distinction the NIH Office of Dietary Supplements draws: the upper tolerable intake level (UL) for supplemental magnesium is 350 mg/day from supplements alone. Dietary magnesium carries no established UL, which is why food sources belong in the stack alongside capsules. An ounce of pumpkin seeds contributes 156 mg, an ounce of dark chocolate adds 64 mg, and a cup of cooked spinach provides 78 mg. That combination gets most men within striking distance of 300 mg before a single capsule.
Split the dose. Take roughly half post-workout, where magnesium may support cortisol clearance after the training stress response. Take the other half 30–60 minutes before bed, the window where the GABA connection matters most. Magnesium activates GABA receptors, the primary inhibitory pathway that quiets the nervous system and enables slow-wave sleep. Deeper slow-wave sleep means a stronger overnight testosterone pulse.
Put differently: the pre-bed dose is not just mineral replacement. It is the signal that tells your nervous system to downshift, and that downshift is the same window your body uses to produce the testosterone that determines your morning levels.
Most men make two mistakes when they first try magnesium: they buy oxide because the label shows a high mg count, and they take it at arbitrary times. Fix the form first, then lock in the timing, and recheck serum magnesium at 8–12 weeks. That marker lives on the Performance+ panel, not the Foundation, worth knowing before you assume your current bloodwork tells the whole story.
If you are unsure which panel fits where you are right now, the PMM quiz can point you in the right direction before you order labs.
Magnesium is a meaningful lever, but it is one lever. If your free testosterone is still low after correcting a deficiency, the problem is not magnesium. Magnesium was masking a broader hormonal picture that needs a complete read.
Hypogonadism, clinically low testosterone, affects an estimated 10–40% of men over 45, according to Mulligan et al., *International Journal of Clinical Practice*, 2006. Many of those men have been told their labs are normal. What they have not been told is that a single total testosterone number, without free testosterone, SHBG, LH, FSH, and estradiol alongside it, is close to useless for diagnosis. Each marker tells a different part of the story:
If those markers point to diagnosed hypogonadism, testosterone replacement therapy (TRT) is FDA-approved for that indication. Some men with low testosterone report meaningful changes in energy and body composition after initiating treatment under medical supervision, though the right starting point is always an accurate diagnosis, not a guess based on symptoms alone.
The Performance+ panel covers all of the above. If you are not sure where you fall, the quiz takes three minutes and tells you which panel makes sense for your situation.
The effect is real, but the mechanism matters. Magnesium competes with sex hormone-binding globulin (SHBG) for binding sites on testosterone molecules, which means more testosterone stays biologically active and available to your tissues. A study by [Maggio et al., *Journal of the American Geriatrics Society*, 2011](https://pubmed.ncbi.nlm.nih.gov/?term=Maggio+testosterone+magnesium+2011) found serum magnesium was independently associated with both total and free testosterone in 399 men. [Cinar et al., *Biological Trace Element Research*, 2010](https://pubmed.ncbi.nlm.nih.gov/?term=Cinar+magnesium+testosterone+2010) found four weeks of supplementation raised free testosterone by roughly 24% in athletes. That said, magnesium is one lever. If your free testosterone stays low after correcting a deficiency, a broader hormonal workup, covering SHBG, LH, FSH, and estradiol, is the appropriate next step.
Yes, and this is one of the most common clinical blind spots in hormone optimization. Standard blood panels measure serum magnesium, which reflects only about 1% of total body magnesium. The other 99% is stored in bone, muscle, and soft tissue. As [Elin documented in *Magnesium Research*, 2010](https://pubmed.ncbi.nlm.nih.gov/?term=Elin+magnesium+2010), serum levels can look normal while intracellular stores are significantly depleted. A result of 1.9 mg/dL clears the standard lab reference range, but PMM's Primal Health Playbook uses tighter functional optimal ranges, and in clinical practice, more than half of men running the [Performance+ panel](/bloodwork) for the first time come back below that functional threshold. The more accurate test is an RBC magnesium assay, which measures magnesium inside the cells rather than in plasma.
Glycinate is the strongest choice for sleep and cortisol regulation, which are the two pathways most directly connected to testosterone production. Magnesium oxide, despite its high mg count on the label, has roughly 4% bioavailability per [Schuette et al., *JPEN*, 1994](https://pubmed.ncbi.nlm.nih.gov/?term=Schuette+magnesium+bioavailability+1994), meaning a 400 mg tablet delivers about 16 mg of absorbable magnesium. That won't move SHBG binding or sleep architecture. Citrate is a reasonable middle option for general use. For the testosterone and sleep goals specifically, 300–400 mg of elemental magnesium as glycinate, split between post-workout and 30–60 minutes before bed, is the protocol the post outlines. The pre-bed dose activates GABA receptors, which quiets the nervous system and deepens slow-wave sleep, the stage where your body produces its largest overnight testosterone pulse.
No. The [$49 Foundation panel](/bloodwork) does not include magnesium. Neither does the $99 Performance panel. Magnesium is measured on the [Performance+ panel](/bloodwork) at $199, alongside Vitamin D, DHEA-S, B12, ApoB, Insulin, and IGF-1. The Foundation panel is designed to answer the first question: is something wrong with your testosterone axis? The Performance+ panel answers the follow-up: what's driving it, and what else is limiting your optimization ceiling? If you've already run a Foundation panel and your testosterone is borderline, the Performance+ panel is the logical next step. If you're not sure which panel fits your situation, the [PMM quiz](/quiz) takes about three minutes.
It does, for two reasons the post covers directly. First, SHBG doesn't stop binding free testosterone just because you're on TRT. If your magnesium is low and your SHBG is elevated, a meaningful fraction of your exogenous testosterone is still being sequestered before it reaches androgen receptors. Men who spend months adjusting their TRT dose chasing low libido or flat energy may be missing a magnesium variable. Second, magnesium supports sleep quality through GABA receptor activation and cortisol regulation through the HPA axis. Both sleep and cortisol directly affect how well your body responds to TRT. Poor slow-wave sleep and elevated baseline cortisol are two of the most common reasons TRT patients plateau, and both can trace back to a mineral the standard panel never measures. Discuss your full micronutrient picture with your clinician before adjusting your protocol.
Take our 2-minute hormone & metabolism quiz to see exactly where you stand — or jump straight to labs or a free screen with our team.