Melatonin is a hormone produced by the pineal gland that regulates sleep-wake cycles, also called circadian rhythms. As we age, our bodies make less melatonin, and melatonin production is particularly impaired in those with Alzheimer’s and other dementias. Melatonin supplements are generally safe and are used to treat insomnia. They may modestly improve sleep, which could theoretically lead to long-term protection against Alzheimer's. However, other insomnia treatments may be more effective and experts do not recommend melatonin for elderly people with dementia.
No human clinical research has studied the direct benefits of melatonin for dementia prevention, though several trials have examined its short-term effects on cognitive function. Our search identified:
• 3 randomized clinical trials in healthy adults looking at effects on cognitive function
• 2 reviews/guidelines on sleep impairment effects from the US Department of Health & Human Services and the American Academy of Sleep Medicine
• 0 observational studies
• Numerous preclinical studies on possible mechanisms of action
Clinical trials in humans have reported mixed effects of melatonin on short-term cognitive functions. In one trial, melatonin improved verbal memory, with slight improvements in other cognitive tests . Another trial showed that a single dose of melatonin enhanced memory functions while under stress, but not after stress . However, in a third trial, melatonin cream did not result in significant effects on cognition . Other clinical trials have found that melatonin treatment significantly lowered the risk of delirium, which is a risk factor for dementia . But a trial of 452 patients found that treatment with melatonin after surgery did not reduce the incidence of delirium .
Preclinical studies suggest melatonin may inhibit neurodegenerative processes, but no clinical research has confirmed these effects.
No clinical studies have tested whether melatonin effects are different in APOE4 carriers. One preclinical study tentatively reported that melatonin could protect from possible toxicity from APOE4  but the findings have not yet been replicated. For more information on what the APOE4 gene allele means for your health, read our APOE4 information page.
Clinical trials have not shown that melatonin can slow disease progression or improve cognitive function in patients with dementia or mild cognitive impairment. A recent meta-analysis of patients with Alzheimer's and other dementias concluded that there are no significant benefits of melatonin on cognitive scores or measures of sleep .In 2015, the American Academy of Sleep Medicine Clinical Practice Guideline recommended against the use of melatonin and sleep-promoting medications for elderly people with dementia due to increased risks of falls and other adverse events 
Clinical evidence suggests that melatonin supplementation is safe for short-term use by most healthy people . The American Academy of Sleep Medicine, however, recommends against the use of melatonin and sleep-promoting medications for demented elderly patients due to increased risks of falls and other adverse events . Although many healthy people have used it for periods longer than two years, the risks or benefits from long-term use have not been well studied.
Reports of serious adverse effects of melatonin supplementation are rare but include nausea, drowsiness, decreased blood-flow, and lower body temperature (hypothermia) . Melatonin may also be unsafe in people with orthostatic hypotension, bleeding disorders, diabetes, depression, autoimmune diseases, seizure disorders, and transplant recipients . In elderly patients with dementia, melatonin treatment has been shown to worsen caregiver ratings of patient mood . It may also interfere with the action of other drugs.
NOTE: This is not a comprehensive safety evaluation or complete list of potentially harmful drug interactions. It is important to discuss safety issues with your physician before taking any new supplement or medication.
Melatonin is available over-the-counter as a liquid, pill, and transdermal patch. As a sleep aid, melatonin is often taken orally in doses of 0.3 to 5 mg/day before bed. The most effective dose and length of treatment vary by individual. Treatment can range from a few days (for jet lag) to nine months (for trouble falling asleep) and should be overseen by a physician.
Melatonin was once derived from bovine pineal glands, which carried the risk of viral contamination . But melatonin supplements are now made synthetically and do not carry this risk. As with most supplements, melatonin quality can be uncertain. Several organizations offer independent testing of supplement quality to earn "seals-of-approval."
Download full scientific report
For information on finding a trusted brand of melatonin supplements, visit United States Pharmacopeial Convention (USP), ConsumerLab, or FDA Information on Dietary Supplements.
Quality testing and important facts about supplements are offered by the NIH Office of Dietary Supplements.
More dosage and safety information on melatonin from Mayo Clinic
Check for drug-drug and drug-supplement interactions on Drugs.com