The gut microbiome can affect sleep by influencing the body's production of sleep-regulating hormones like melatonin. Furthermore, alterations in the gut microbiome have been linked to sleep disorders like insomnia and poor sleep quality.