Melatonin is probably a placebo, and not necessarily a safe one. The best data indicate it MIGHT be useful for jet lag but isn't very useful for sleep in placebo controlled studies. FDA noted in 2010 that there is evidence of carcinogenic effects when taken orally and also damage to retina cells.
"I may be synthetic but I'm not stupid"
Bishop, in "Aliens"