Behaviors first, then magnesium, apigenin and theanine: the sleep supplement order

October 6, 2026 · 27 min read

Huberman's sleep toolkit and supplement framework and Walker's review of the evidence agree that supplements come after light, timing and temperature, and that the options should be tried one at a time. It gives readers a sober way to judge sleep products without relying on melatonin.

The insight in about three minutes.

For better sleep, fix behaviors first, then nutrition, then consider supplements, and only then prescription drugs from a physician. Andrew Huberman repeats that order in almost every setting. Matt Walker, a sleep scientist, shares the order and is cooler on the supplements themselves. Both say to change one thing at a time and watch what happens. This is general information from podcast conversations, not medical advice. Talk to your doctor before adding or removing a supplement, especially if you take medication, are pregnant or are deciding for a child.

Huberman's reason for the order is short: "No supplement actually rewires you or changes your nervous system. Behaviors do that." The behaviors come down to light, caffeine, food and temperature. View sunlight within 30 to 60 minutes of waking, for five to 30 minutes depending on cloud. Stop caffeine by 2 p.m., or earlier. Avoid food in the two hours before bed, without going to bed so hungry you cannot sleep. Dim the lights after sundown and avoid bright light between 10 p.m. and 4 a.m. Keep the bedroom cool. Do not use alcohol or cannabis as sleep aids, since they sedate without giving normal sleep. For some people, he says, the right number of supplements is zero.

Only if sleep is still poor does he suggest a supplement, taken 30 to 60 minutes before bed: 145 milligrams of magnesium threonate, 50 milligrams of apigenin, or 100 to 400 milligrams of theanine. He wants single ingredients, not blends, tried one at a time for about a week with everything else held steady, so you can tell what helps or hurts. About 5 percent of people get gut distress from magnesium threonate and should stop. Theanine gives some people dreams vivid enough to disrupt sleep, and they should leave it out. For waking at 2 or 3 a.m., he points to 900 milligrams of myo-inositol. He suggests a night off every two weeks to a month to check you are not relying on the pills.

Both men dislike store-bought melatonin. Huberman's concern is that it is a hormone affecting other hormone systems, especially in children. Walker's is that in healthy adults it adds only a few minutes of sleep, and that labels are unreliable. It may help older adults.

Walker judges by published trials. He calls the magnesium data "uncompelling" and says the benefit shown was in people who were likely deficient. The evidence for apigenin is mostly subjective. Valerian does worst. Tart cherry and kiwi are preliminary but intriguing. For insomnia he points to cognitive behavioral therapy, which beats sleeping pills in the long term. His test is a month of baseline, a month on, and a month off.

The plain disagreement is magnesium. Huberman relies on how it reaches the brain and on his own experience, and Walker on what trials have shown.

What to do with it: check your caffeine and late eating before buying anything. Get outside in the morning. Make evenings dim and cool. If sleep is still poor, try one ingredient, stop whatever disagrees with you, and run the removal test.

If you lie awake for 20 to 25 minutes or more, wake many times a night or suspect sleep apnea, see a professional.

This is the short form. The full insight has every expert's reasoning, their own words and the sources.