How does melatonin work?
Melatonin is regulated by light. When your outside environment gets darker, your brain makes melatonin — a hormone that triggers sleep processes within the body. Melatonin is not produced when it is light outside.
Melatonin as a supplement
Your brain makes enough melatonin to support healthy sleep cycles. Some people take laboratory-made melatonin as a supplement, although there is little evidence that this is an effective treatment for insomnia. Expert groups like the American College of Physicians recommend treatments like cognitive behavioral therapy for insomnia (CBT-I) rather than melatonin for chronic insomnia.