Taking a tablet or capsule of melatonin before bedtime may help you sleep earlier and for longer.  But we need more research on the effects of melatonin in older people, and whether it is safe to take this treatment if you're taking other medicines.
Melatonin is a hormone. Hormones are chemicals your body makes to control some of the things it does. For example, hormones can tell your body how to use energy, or when to go to sleep.
Melatonin controls your body clock. Normally, your body makes melatonin during the night to help you sleep, starting when it gets dark and stopping when it gets light. The melatonin used as a treatment for insomnia (poor-quality sleep) is a man-made version of this hormone.
In the UK, doctors can prescribe a brand of melatonin called Circadin. It's recommended for people over the age of 55.  You can't buy melatonin over the counter in the UK.
In the US, melatonin can be sold to the public in health food shops and pharmacies. However, it isn't sold as a medicine but as a supplement, like vitamin tablets or cod liver oil. This means that, like all supplements, it may not be made to the same standards as medicines. So you can't be certain how good its quality is.
If you're thinking of buying melatonin in the US, or over the internet, there are a few things to bear in mind. The exact ingredients can vary between different brands, so it can be hard to know what you're buying. Scientists have found impurities in the melatonin tablets sold by some companies. This means that some tablets contain things that aren't listed on the label. Tablets sold over the internet won't have gone through the safety checks that usually apply to drugs in the UK. It can be difficult to know which companies to trust.
Two summaries of the research ( systematic reviews) showed that melatonin can help adults, including older people, to sleep better.   You can expect to get to sleep a few minutes sooner and to sleep slightly longer.
We don't know how safe melatonin is, or how safe it is to take regularly for a long time. There hasn't been enough research to say. We also don't know how much melatonin you need and when you should take the dose. 
The summaries we found didn't mention any side effects from melatonin. But some studies in children found that some of them who took melatonin:  
Lost their appetite
Felt in a low mood
Had mild headaches.
Some drugs can interfere with other medicines or stop them working. Or if you have another medical condition, some drugs may make it worse. You should check with your doctor before taking melatonin if you're already taking other medicines.
Experts say you shouldn't take melatonin if you: 
A systematic review is a thorough look through published research on a particular topic. Only studies that have been carried out to a high standard are included. A systematic review may or may not include a meta-analysis, which is when the results from individual studies are put together.
For more terms related to Insomnia in adults
For references related to Insomnia in adults click here