Endogenous melatonin levels are inversely associated with age and cognitive deficits. Although melatonin can improve psychopathological behavior disturbances in clinical trials, whether melatonin may also enhance cognitive function remains elusive. This study examined cognitive outcomes from randomized trials of melatonin treatment for Alzheimer's disease (AD), insomnia, and healthy-subjects. Twenty-two studies met the inclusion criteria (AD = 9, insomnia = 2, healthy-subjects = 11). AD patients receiving >12 weeks of melatonin treatment improved mini-mental state examination (MMSE) score [MD: 1.82 (1.01; 2.63) p < 0.0001]. Importantly, melatonin significantly improved MMSE score in mild stage of AD [MD: 1.89 (0.96; 2.82) p < 0.0001]. In healthy-subjects, although daytime melatonin treatment notably decreased in accuracy by correct responses [SMD: -0.74 (-1.03; -0.45) p < 0.00001], the reaction-time score on different stimuli (p = 0.37) did not increased. Additionally, by pooling of short-term, spatial, and visual memory scores, melatonin did not reduce memory function (p = 0.08). Meta-analysis of MMSE score suggested that melatonin is effective in treatment for mild stage of AD. Additionally, we propose that melatonin may be preferable to traditional hypnotics in management of insomnia.