There are a lot of factors that determine how well we sleep in bed at night. This has become a huge source of struggle for many of us.
Melatonin is the sleep hormone that is your body's natural clock to tell your brain when to sleep and when to wake up. It is stimulated by darkness and reduced by light. As you get older, it decreases. Around 50 it drops around 50% and by 70 around 75%.
So if you crawl under the blankets and find you are having trouble sleeping at night or wake up in the middle of the night, the a popular solution would be to take melatonin as a supplement. How much do you take? Common sense would tell you that children should be given a much lower dose than say, a 70 year old. And taking too much can result in unwanted side effects.
For an adult, it is suggested to start out on a low dosage, ie .03 mg at bedtime and work up if needed. If you take too much, it could cause morning drowsiness, headaches, more restless sleep than before or have no effect at all.
Studies have been done on the effects of melatonin supplements on jet lag symptoms, children with sleep disorders, blind people, Alzheimer's disease, inflamation, chronic fatigue syndrom, asthma, cancer and many other diseases. For each, doses vary and and some studies have come to inconclusive results in the end. More information on these studies are found at http://www.mayoclinic.org/drugs-supplements/melatonin/dosing/hrb-20059770.
The final determination is that every person is different, and each one has to find their own slot that works for them. Melatonin may help to sleep when you pull the sheets back and climb into bed at night. But the cause of sleeplessness is what really needs to be addressed.