Melatonin is a hormone released by the pineal gland in the brain at night, and has long been associated with control of the sleep–wake cycle.
In animals, melatonin plays an important role in the regulation of sleep–wake cycles. Human infants melatonin levels become regular in about the third month after birth, with the highest levels measured between midnight and 8:00 am.
Human melatonin production decreases as a person ages. Also, as children become teenagers, the nightly schedule of melatonin release is delayed, leading to later sleeping and waking times.
Melatonin is used as a prescription medication and over-the-counter dietary supplement in the treatment of sleep disorders such as insomnia and circadian rhythm sleep disorders like delayed sleep phase disorder, jet lag disorder, and shift work disorder.