Melatonin is a hormone, produced by the pineal gland among other locations, which regulates wakefulness. As a medicine, it is used to treat insomnia; however, evidence of benefit is unclear. One review found onset of sleep occurred 6 minutes faster with use but found no change in total time asleep.