I am not a doctor and can not answer this question. The answer depends on a large extent on your existing conditions and genetics and situation. What may be safe for one person may not be safe for another.
Melatonin is considered a hormone, which means you have to be a bit more careful with them than other “safer” supplements. While melatonin is something that your body produces naturally; unlike vitamins, it is more like hormone therapy and is therefore trickier to get the correct dosing. External sources of hormone can throw off the body’s hormonal feedback mechanism.
Children will usually not need melatonin because their body will naturally create the right amount. It can be argued that some elderly may no longer produce optimal amounts of this hormone and that supplementation is just providing what the body would have naturally produce but is unable to due to age.
Then you also have to balance the risk of taking melatonin with the risk of not sleeping. While there is a risk of taking melatonin, depending on the severity of a particular sleep issue, that risk may be lower than the risk of not being able to sleep.
As always, try lifestyle changes and sleep hygiene techniques first.
What I can say is that I have taken melatonin supplements myself and I am careful to research all supplements before taking them. Here are some of what other thinks about melatonin.
Dr. Demet of the book The Promise of Sleep writes …
“Since melatonin can constrict blood vessels, there is some concern that it may pose a danger for people with cardiovascular disease. … the hormone is less carefully regulated for purity and dosage than are prescription medications, and that much more research into its actions remains to be conducted. Nevertheless, melatonin does seem to help some people, so I don’t discourage interested patients from trying it in small doses as a remedy for transient insomnia and jet lag.” [page 155]
That’s good advice. Start off with the smallest dose that would get you to sleep, no higher. You can always reduce the dosage by splitting the capsule or take fewer capsules. Because some of the supplement amounts (such as 5 mg) are way bigger than what your body normally would make on its own (which is around 0.5 mg). See reference on Huffington Post article, which also mention that one doctor reports that long term use might de-sensitize your receptors so that you need more an more to get the same response.
WebMD says that …
“Melatonin is LIKELY SAFE for most adults when taken by mouth or injected into the body in the short-term, or when applied to the skin. “
But with special precautions and warning for children and pregnant and breast-feeding women.
It also says to not drive or use machinery for four to five hours after taking melatonin — which makes a lot of sense.
“Melatonin is not considered an effective treatment for insomnia. Melatonin in pill form does not function like your body’s naturally produced melatonin: It affects the brain in bursts and rapidly leaves the system, instead of the slow build-up and slow wash-out that your body’s naturally produced melatonin experiences.”