Melatonin is a hormone produced primarily by the pineal gland in the brain. It helps regulate the sleep-wake cycle in both humans and animals and has an influence on reproductive cycles.