Melatonin is a hormone produced by the pineal gland that plays a vital role in regulating the circadian rhythm . Melatonin is released into the bloodstream according to the timing of the internal biological clock. Researchers use melatonin as a marker for the internal time of the biological clock. Melatonin is often called the hormone of darkness because it is secreted during darkness in every species that has been studied. Melatonin triggers physiological changes that prepare an individual for the activities of their natural nighttime behavior. In nocturnal species, melatonin is associated with waking and activity. In diurnal (day-active) species, like humans, melatonin initiates physiological changes like the decrease in body temperature and respiration rate associated with sleep.
Melatonin is essential in the process of circadian entrainment , which allows an adjustment of circadian rhythm to environmental conditions. Several zeitgebers can influence the timing of the circadian rhythm, but the most powerful is light. Specialized photoreceptive cells in the eye called retinal ganglion cells detect light and transmit that information to an area of the brain called the suprachiasmatic nuclei . Light can advance or delay the timing of the internal clock, depending on when it is detected. Light in the morning advances the clock, but light at night delays it. That is the reason many people are concerned about blue-light from electronic devices, which likely suppresses melatonin and delays sleep onset.
Melatonin can be taken as a supplement. It is recognized as a treatment for jet-lag . It is sometimes used to treat insomnia because it might improve sleep onset latency and sleep quality, but substantial evidence of these effects is lacking . When people recommend eating specific foods to enhance sleep, it is usually because those foods contain melatonin or tryptophan. Tryptophan is an amino acid contained in protein . It is used by the body to make the neurotransmitter serotonin, which is also a precursor of melatonin. Both melatonin and tryptophan are contained in a large number of common foods. However, due to dosage and timing challenges getting enough melatonin or tryptophan from dietary sources to improve sleep could prove challenging.