Sleep isn't passive — it's an active, staged process the brain has to switch into, and the switch is chemical. Magnesium and glycine both calm the nervous system and nudge core body temperature down, the physiological cue for sleep onset; glycine specifically improves slow-wave (deep) sleep quality. Vitamin B6 is the cofactor that converts these precursors into the inhibitory neurotransmitters (GABA, and serotonin → melatonin) that hold sleep through the night. Low magnesium is one of the most common reversible causes of restless, fragmented sleep. These 48 whole foods are ranked by how many of the key sleep nutrients a typical serving delivers (≥10% DV each).