Melatonin is not regulated by the FDA like a medicine. It is classified as a dietary supplement and so data and research about its effects are limited. However, Melatonin is eliminated quickly, blood levels are reduced by half after 20 to 50 minutes. Doses are best given 30 to 60 minutes before bed with peak levels around an hour later.
Studies suggest melatonin may be effective in promoting but not maintaining sleep (early morning awakening). There is no data available on how long one can stay asleep.
Melatonin is a manmade form of a hormone produced in the brain that helps regulate your sleep and wake cycle. It has been used in alternative medicine as a likely effective aid in treating insomnia (trouble falling asleep or staying asleep).
If you are taking a long acting melatonin formulation and suffer from night time waking, you may get more success with these rather than standard release formulations.
For more information visit: https://www.drugs.com/melatonin.html