When eyes receive light from the sun, the pineal gland's production of melatonin is inhibited and the hormones produced keep the human awake. When the eyes do not receive light, melatonin is produced in the pineal gland and the human becomes tired.
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 occurs at high concentrations within mitochondrial fluid which greatly exceed the plasma concentration of melatonin. Due to its capacity for free radical scavenging, indirect effects on the expression of antioxidant enzymes, and its significant concentrations within mitochondria, a number of authors have indicated that melatonin has an important physiological function as a mitochondrial antioxidant.
The melatonin metabolites produced via the reaction of melatonin with reactive oxygen species or reactive nitrogen species also react with and reduce free radicals. Melatonin metabolites generated from redox reactions include cyclic 3-hydroxymelatonin, N1-acetyl-N2-formyl-5-methoxykynuramine (AFMK), and N1-acetyl-5-methoxykynuramine (AMK).
While it is known that melatonin interacts with the immune system, the details of those interactions are unclear. An antiinflammatory effect seems to be the most relevant. There have been few trials designed to judge the effectiveness of melatonin in disease treatment. Most existing data are based on small, incomplete trials. Any positive immunological effect is thought to be the result of melatonin acting on high-affinity receptors (MT1 and MT2) expressed in immunocompetent cells. In preclinical studies, melatonin may enhance cytokine production, and by doing this, counteract acquired immunodeficiences. Some studies also suggest that melatonin might be useful fighting infectious disease including viral, such as HIV, and bacterial infections, and potentially in the treatment of cancer.
In bacteria, protists, fungi, and plants, melatonin is synthesized indirectly with tryptophan as an intermediate product of the shikimate pathway. In these cells, synthesis starts with D-erythrose 4-phosphate and phosphoenolpyruvate, and in photosynthetic cells with carbon dioxide. The rest of the synthesizing reactions are similar, but with slight variations in the last two enzymes.
It has been hypothesized that melatonin is made in the mitochondria and chloroplasts.
Mechanism of melatonin biosynthesis.
In order to hydroxylate L-tryptophan, the cofactor tetrahydrobiopterin (THB) must first react with oxygen and the active site iron of tryptophan hydroxylase. This mechanism is not well understood, but two mechanisms have been proposed:
1. A slow transfer of one electron from the THB to O2 could produce a superoxide which could recombine with the THB radical to give 4a-peroxypterin. 4a-peroxypterin could then react with the active site iron (II) to form an iron-peroxypterin intermediate or directly transfer an oxygen atom to the iron.
2. O2 could react with the active site iron (II) first, producing iron (III) superoxide which could then react with the THB to form an iron-peroxypterin intermediate.
Iron (IV) oxide from the iron-peroxypterin intermediate is selectively attacked by a double bond to give a carbocation at the C5 position of the indole ring. A 1.2-shift of the hydrogen and then a loss of one of the two hydrogen atoms on C5 reestablishes aromaticity to furnish 5-hydroxy-L-tryptophan.
A decarboxylase with cofactor pyridoxal phosphate (PLP) removes CO2 from 5-hydroxy-L-tryptophan to produce 5-hydroxytryptamine. PLP forms an imine with the amino acid derivative. The amine on the pyridine is protonated and acts as an electron sink, enabling the breaking of the C-C bond and releasing CO2. Protonation of the amine from tryptophan restores the aromaticity of the pyridine ring and then imine is hydrolyzed to produce 5-hydroxytryptamine and PLP.
It has been proposed that histidine residue His122 of serotonin N-acetyl transferase is the catalytic residue that deprotonates the primary amine of 5-hydroxytryptamine, which allows the lone pair on the amine to attack acetyl-CoA, forming a tetrahedral intermediate. The thiol from coenzyme A serves as a good leaving group when attacked by a general base to give N-acetylserotonin.
In vertebrates, melatonin secretion is regulated by activation of the beta-1 adrenergic receptor by norepinephrine. Norepinephrine elevates the intracellular cAMP concentration via beta-adrenergic receptors and activates the cAMP-dependent protein kinase A (PKA). PKA phosphorylates the penultimate enzyme, the arylalkylamine N-acetyltransferase (AANAT). On exposure to (day)light, noradrenergic stimulation stops and the protein is immediately destroyed by proteasomalproteolysis. Production of melatonin is again started in the evening at the point called the dim-light melatonin onset.
Blue light, principally around 460–480 nm, suppresses melatonin biosynthesis, proportional to the light intensity and length of exposure. Until recent history, humans in temperate climates were exposed to few hours of (blue) daylight in the winter; their fires gave predominantly yellow light. The incandescent light bulb widely used in the 20th century produced relatively little blue light. Light containing only wavelengths greater than 530 nm does not suppress melatonin in bright-light conditions. Wearing glasses that block blue light in the hours before bedtime may decrease melatonin loss. Use of blue-blocking goggles the last hours before bedtime has also been advised for people who need to adjust to an earlier bedtime, as melatonin promotes sleepiness.
Melatonin was first discovered in connection to the mechanism by which some amphibians and reptiles change the color of their skin. As early as 1917, Carey Pratt McCord and Floyd P. Allen discovered that feeding extract of the pineal glands of cows lightened tadpole skin by contracting the dark epidermalmelanophores.
Many animals use the variation in duration of melatonin production each day as a seasonal clock. In animals including humans, the profile of melatonin synthesis and secretion is affected by the variable duration of night in summer as compared to winter. The change in duration of secretion thus serves as a biological signal for the organization of daylength-dependent (photoperiodic) seasonal functions such as reproduction, behavior, coat growth, and camouflage coloring in seasonal animals. In seasonal breeders that do not have long gestation periods and that mate during longer daylight hours, the melatonin signal controls the seasonal variation in their sexual physiology, and similar physiological effects can be induced by exogenous melatonin in animals including mynah birds and hamsters. Melatonin can suppress libido by inhibiting secretion of luteinizing hormone and follicle-stimulating hormone from the anterior pituitary gland, especially in mammals that have a breeding season when daylight hours are long. The reproduction of long-day breeders is repressed by melatonin and the reproduction of short-day breeders is stimulated by melatonin.
During the night, melatonin regulates leptin, lowering its levels.
Until its identification in plants in 1987, melatonin was for decades thought to be primarily an animal neurohormone. When melatonin was identified in coffee extracts in the 1970s, it was believed to be a byproduct of the extraction process. Subsequently, however, melatonin has been found in all plants that have been investigated. It is present in all the different parts of plants, including leaves, stems, roots, fruits, and seeds, in varying proportions. Melatonin concentrations differ not only among plant species, but also between varieties of the same species depending on the agronomic growing conditions, varying from picograms to several micrograms per gram. Notably high melatonin concentrations have been measured in popular beverages such as coffee, tea, wine, and beer, and crops including corn, rice, wheat, barley, and oats. In some common foods and beverages, including coffee and walnuts, the concentration of melatonin has been estimated or measured to be sufficiently high to raise the blood level of melatonin above daytime baseline values.
Although a role for melatonin as a plant hormone has not been clearly established, its involvement in processes such as growth and photosynthesis is well established. Only limited evidence of endogenous circadian rhythms in melatonin levels has been demonstrated in some plant species and no membrane-bound receptors analogous to those known in animals have been described. Rather, melatonin performs important roles in plants as a growth regulator, as well as environmental stress protector. It is synthesized in plants when they are exposed to both biological stresses, for example, fungal infection, and nonbiological stresses such as extremes of temperature, toxins, increased soil salinity, drought, etc.
Naturally-occurring melatonin has been reported in foods including tart cherries to about 0.17–13.46 ng/g, bananas, plums, grapes, rice, cereals, herbs, olive oil, wine, and beer. The consumption of milk and sour cherries may improve sleep quality. When birds ingest melatonin-rich plant feed, such as rice, the melatonin binds to melatonin receptors in their brains. When humans consume foods rich in melatonin, such as banana, pineapple, and orange, the blood levels of melatonin increase significantly.
^ abcdefJockers R, Delagrange P, Dubocovich ML, Markus RP, Renault N, Tosini G, et al. (September 2016). "Update on melatonin receptors: IUPHAR Review 20". British Journal of Pharmacology. 173 (18): 2702–25. doi:10.1111/bph.13536. PMC4995287. PMID27314810. Hence, one melatonin molecule and its associated metabolites could scavenge a large number of reactive species, and thus, the overall antioxidant capacity of melatonin is believed to be greater than that of other well‐known antioxidants, such as vitamin C and vitamin E, under in vitro or in vivo conditions (Gitto et al., 2001; Sharma and Haldar, 2006; Ortiz et al., 2013).
^ abcReiter RJ, Rosales-Corral S, Tan DX, Jou MJ, Galano A, Xu B (November 2017). "Melatonin as a mitochondria-targeted antioxidant: one of evolution's best ideas". Cellular and Molecular Life Sciences. 74 (21): 3863–3881. doi:10.1007/s00018-017-2609-7. PMID28864909. S2CID23820389. melatonin is specifically targeted to the mitochondria where it seems to function as an apex antioxidant ... The measurement of the subcellular distribution of melatonin has shown that the concentration of this indole in the mitochondria greatly exceeds that in the blood.
^ abcReiter RJ, Mayo JC, Tan DX, Sainz RM, Alatorre-Jimenez M, Qin L (October 2016). "Melatonin as an antioxidant: under promises but over delivers". Journal of Pineal Research. 61 (3): 253–78. doi:10.1111/jpi.12360. PMID27500468. S2CID35435683. There is credible evidence to suggest that melatonin should be classified as a mitochondria-targeted antioxidant.
^ abcManchester LC, Coto-Montes A, Boga JA, Andersen LP, Zhou Z, Galano A, et al. (November 2015). "Melatonin: an ancient molecule that makes oxygen metabolically tolerable". Journal of Pineal Research. 59 (4): 403–19. doi:10.1111/jpi.12267. PMID26272235. S2CID24373303. While originally thought to be produced exclusively in and secreted from the vertebrate pineal gland , it is now known that the indole is present in many, perhaps all, vertebrate organs  and in organs of all plants that have been investigated [48, 55, 56]. That melatonin is not relegated solely to the pineal gland is also emphasized by the reports that it is present in invertebrates [57–59], which lack a pineal gland and some of which consist of only a single cell.
^Pieri C, Marra M, Moroni F, Recchioni R, Marcheselli F (1994). "Melatonin: a peroxyl radical scavenger more effective than vitamin E". Life Sciences. 55 (15): PL271-6. doi:10.1016/0024-3205(94)00666-0. PMID7934611.
^Arushanian EB, Beĭer EV (2002). "[Immunotropic properties of pineal melatonin]". Eksperimental'naia i Klinicheskaia Farmakologiia (in Russian). 65 (5): 73–80. PMID12596522.
^Carrillo-Vico A, Reiter RJ, Lardone PJ, Herrera JL, Fernández-Montesinos R, Guerrero JM, Pozo D (May 2006). "The modulatory role of melatonin on immune responsiveness". Current Opinion in Investigational Drugs. 7 (5): 423–31. PMID16729718.
^Sumi-Ichinose C, Ichinose H, Takahashi E, Hori T, Nagatsu T (March 1992). "Molecular cloning of genomic DNA and chromosomal assignment of the gene for human aromatic L-amino acid decarboxylase, the enzyme for catecholamine and serotonin biosynthesis". Biochemistry. 31 (8): 2229–38. doi:10.1021/bi00123a004. PMID1540578.
^ abArendt J, Skene DJ (February 2005). "Melatonin as a chronobiotic". Sleep Medicine Reviews. 9 (1): 25–39. doi:10.1016/j.smrv.2004.05.002. PMID15649736. Exogenous melatonin has acute sleepiness-inducing and temperature-lowering effects during 'biological daytime', and when suitably timed (it is most effective around dusk and dawn), it will shift the phase of the human circadian clock (sleep, endogenous melatonin, core body temperature, cortisol) to earlier (advance phase shift) or later (delay phase shift) times.
^Chaturvedi CM (1984). "Effect of Melatonin on the Adrenl and Gonad of the Common Mynah Acridtheres tristis". Australian Journal of Zoology. 32 (6): 803–09. doi:10.1071/ZO9840803.
^Chen HJ (July 1981). "Spontaneous and melatonin-induced testicular regression in male golden hamsters: augmented sensitivity of the old male to melatonin inhibition". Neuroendocrinology. 33 (1): 43–6. doi:10.1159/000123198. PMID7254478.
^Bonnefont-Rousselot D, Collin F (November 2010). "Melatonin: action as antioxidant and potential applications in human disease and aging". Toxicology. 278 (1): 55–67. doi:10.1016/j.tox.2010.04.008. PMID20417677.
^Reiter RJ, Manchester LC, Tan DX (September 2005). "Melatonin in walnuts: influence on levels of melatonin and total antioxidant capacity of blood". Nutrition. 21 (9): 920–4. doi:10.1016/j.nut.2005.02.005. PMID15979282.
^Socaciu AI, Ionuţ R, Socaciu MA, Ungur AP, Bârsan M, Chiorean A, et al. (December 2020). "Melatonin, an ubiquitous metabolic regulator: functions, mechanisms and effects on circadian disruption and degenerative diseases". Reviews in Endocrine & Metabolic Disorders. 21 (4): 465–478. doi:10.1007/s11154-020-09570-9. PMID32691289. S2CID220657247.
^Burkhardt S, Tan DX, Manchester LC, Hardeland R, Reiter RJ (October 2001). "Detection and quantification of the antioxidant melatonin in Montmorency and Balaton tart cherries (Prunus cerasus)". Journal of Agricultural and Food Chemistry. 49 (10): 4898–902. doi:10.1021/jf010321. PMID11600041.
^Hattori A, Migitaka H, Iigo M, Itoh M, Yamamoto K, Ohtani-Kaneko R, et al. (March 1995). "Identification of melatonin in plants and its effects on plasma melatonin levels and binding to melatonin receptors in vertebrates". Biochemistry and Molecular Biology International. 35 (3): 627–34. PMID7773197.
^Sae-Teaw M, Johns J, Johns NP, Subongkot S (August 2013). "Serum melatonin levels and antioxidant capacities after consumption of pineapple, orange, or banana by healthy male volunteers". Journal of Pineal Research. 55 (1): 58–64. doi:10.1111/jpi.12025. PMID23137025. S2CID979886.