In animals, melatonin is involved in the entrainment (synchronization) of the circadian rhythms including sleep-wake timing, blood pressure regulation, seasonal reproduction, and many others. Many of its biological effects in animals are produced through activation of melatonin receptors, while others are due to its role as an antioxidant, with a particular role in the protection of nuclear and mitochondrial DNA.
As a medicine, it is used for the treatment of insomnia; however, scientific evidence is insufficient to demonstrate a benefit in this area. Melatonin is sold over the counter in the United States, Canada and some European countries. In other countries, it may require a prescription or it may be unavailable.
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 epidermal melanophores.
In 1958, dermatology professor Aaron B. Lerner and colleagues at Yale University, in the hope that a substance from the pineal might be useful in treating skin diseases, isolated the hormone from bovine pineal gland extracts and named it melatonin. In the mid-70s Lynch et al. demonstrated that the production of melatonin exhibits a circadian rhythm in human pineal glands.
The discovery that melatonin is an antioxidant was made in 1993. The first patent for its use as a low-dose sleep aid was granted to Richard Wurtman at MIT in 1995. Around the same time, the hormone got a lot of press as a possible treatment for many illnesses. The New England Journal of Medicine editorialized in 2000: "With these recent careful and precise observations in blind persons, the true potential of melatonin is becoming evident, and the importance of the timing of treatment is becoming clear."
Melatonin is used as a safer alternative than clonazepam in the treatment of REM sleep behavior disorder—a condition associated with the synucleinopathies like Parkinson's disease and dementia with Lewy bodies. In Europe, including the UK, it is used as a drug for short-term treatment of insomnia in people who are 55 years old or older.
Melatonin appears to cause very few side effects as tested in the short term, up to three months, at low doses. Two systematic reviews found no adverse effects of exogenous melatonin in several clinical trials and comparative trials found the adverse effects headaches, dizziness, nausea, and drowsiness were reported about equally for both melatonin and placebo. Prolonged-release melatonin is safe with long-term use of up to 12 months. Although not recommended for long term use beyond this, low-dose melatonin is generally safer, and a better alternative, than many prescription and over the counter sleep aids if a sleeping medication must be used for an extended period of time. Low-doses of melatonin are usually sufficient to produce a hypnotic effect in most people. Higher doses do not appear to result in a stronger effect, but instead appear to cause drowsiness for a longer period of time.