Melatonin is a neurohormone that is produced in the brain, primarily by the pineal gland, from the amino acid tryptophan. Its most well known functions include helping to regulate sleep and the body’s circadian rhythm.
The amount of melatonin we produce is determined by how dark or light our surroundings are. Our eyes have specialized light-sensitive receptors that relay this message to a cluster of nerves in the brain called the suprachiasmatic nucleus, or SCN. The SCN sets our internal biological clock (circadian rhythm) while also regulating sleep. When our surroundings are dark, the SCN tells the pineal gland to produce melatonin, which is thought to trigger sleep. Some melatonin is also made in the stomach and intestines.