Melatonin, produced by the pineal gland, regulates the sleep-wake cycle. Its production increases in the evening, promoting sleep, and decreases in the morning, helping with wakefulness. Disruptions in melatonin production can lead to sleep disorders, affecting overall health.