Primary Causes & Action Plans

Cortisol (Evening/Bedtime)

Should be low at bedtime; elevated evening cortisol prevents sleep onset
Cortisol should follow a diurnal rhythm: high in morning, low in evening. Elevated bedtime cortisol (from chronic stress or HPA axis dysregulation) prevents sleep onset and causes middle-of-night awakenings.
Target < 3 mcg/dL (bedtime)
Suggested Action Plan

Lower evening cortisol through stress management (meditation, yoga), limiting caffeine after 2 PM, and ensuring morning light exposure to set circadian rhythm. Avoid intense exercise within 3 hours of bedtime.

Magnesium

Critical for nervous system relaxation and GABA synthesis; deficiency causes insomnia
Magnesium is the body's natural muscle relaxant and is required for GABA synthesis. Deficiency is extremely common and directly causes insomnia, restless sleep, and nocturnal muscle tension.
Target > 2.0 mEq/L
Suggested Action Plan

Supplement with magnesium glycinate 300-500 mg taken 1-2 hours before bed. This is the single most effective supplement for insomnia caused by magnesium deficiency. Most people sleep better within days.

Iron and Ferritin

Low iron impairs oxygen delivery to brain; also causes restless leg syndrome
Iron deficiency impairs cerebral oxygen delivery and impairs dopamine synthesis (needed for sleep quality). Iron deficiency often causes restless leg syndrome, a major cause of sleep disruption.
Target Ferritin: 50-150 ng/mL
Suggested Action Plan

If low, supplement with iron glycinate 25 mg daily (gentle form, take with vitamin C). Separate from magnesium and calcium supplements by 2+ hours. Retest in 8-12 weeks.

Thyroid Panel (TSH, Free T4)

Thyroid dysfunction impairs sleep architecture; both hypo- and hyperthyroidism disrupt sleep
Hypothyroidism causes heavy, unrefreshing sleep and daytime sleepiness. Hyperthyroidism causes racing thoughts and insomnia. Both need correction for normal sleep.
Target TSH: 1.0-2.5 mIU/L; Free T4: 1.0-1.5 ng/dL
Suggested Action Plan

If thyroid function is abnormal, thyroid hormone replacement or antithyroid treatment (as appropriate) typically improves sleep architecture significantly. Retest 6-8 weeks after adjustment.

Vitamin D

Regulates circadian rhythm and serotonin synthesis; deficiency impairs sleep quality
Vitamin D is essential for circadian rhythm regulation and serotonin production (precursor to melatonin). Deficiency disrupts sleep-wake cycle and reduces sleep quality.
Target > 50 ng/mL
Suggested Action Plan

If deficient, supplement vitamin D3 4000-5000 IU daily plus morning sun exposure (to set circadian rhythm). Target 60-80 ng/mL for optimal sleep. Retest in 8-12 weeks.

Getting Started

1
Test Your Sleep Biomarkers

Order a 4-point salivary cortisol test, magnesium, iron/ferritin, thyroid panel (TSH, free T4), and vitamin D. These tests identify the specific metabolic drivers of your sleep disruption.

2
Identify Your Primary Sleep Driver

Do you have difficulty falling asleep (suggests elevated evening cortisol)? Muscle tension/restless legs (magnesium/iron)? Unrefreshing sleep (thyroid)? Your symptom pattern points to the culprit.

3
Supplement the Deficient Mineral

If magnesium is low, magnesium glycinate 300-500 mg at bedtime is remarkably effective—most people sleep better within 1-3 days. Do not wait for other interventions; start this immediately.

4
Optimize Your Sleep Environment and Routine

Sleep in a dark, cool room (60-67°F). Avoid screens 1-2 hours before bed (blue light suppresses melatonin). Maintain a consistent sleep-wake schedule, even on weekends. These habits amplify the effect of nutrient optimization.

5
Retest in 4-8 Weeks

With targeted supplementation and metabolic optimization, sleep typically improves significantly within 4-8 weeks. Retest biomarkers to confirm improvement and adjust supplementation as needed. Most people can discontinue sleep aids once metabolism is optimized.

Why I built this guide.

"Insomnia is usually a symptom of metabolic imbalance, not a primary psychiatric disease. Test and fix the cause. Sleep restores quickly."

Explore More