Researchers have discovered that the amino acid D-serine plays a role in regulating sleep patterns. While D-serine was first detected in animals over two decades ago, little is known about its physiological functions. The study found that mutants defective in D-serine synthesis or its receptor N-methyl-D-aspartic receptor 1 (NMDAR1) had decreased sleep, while mutants defective in D-serine degradation had increased sleep. Additionally, the study found that D-serine, but not L-serine, rescued the phenotype of mutants lacking serine racemase, the key enzyme for D-serine synthesis. Further experiments revealed that D-serine functions upstream of NMDAR1 and that expression of serine racemase was detected in both the nervous system and the intestines. Surprisingly, reintroduction of serine racemase into specific intestinal epithelial cells rescued the sleep phenotype of mutants. These findings establish a novel physiological function for endogenous D-serine and highlight an unexpected role for intestinal cells in regulating sleep patterns.