Melatonin is a hormone produced by the pineal gland in the brain, primarily responsible for regulating sleep-wake cycles and circadian rhythms. It plays a crucial role in signaling the body when it is time to sleep, typically increasing in production during the night and decreasing during daylight. Melatonin's effects extend beyond sleep regulation, influencing various physiological processes in response to environmental light changes.