I discuss melatonin's effects on sleep & its safety; I segue into the general benefits of sleep and the severely disrupted sleep of the modern Western world, the cost of melatonin use and the benefit (eg. enforcing regular bedtimes), followed by a basic cost-benefit analysis of melatonin concluding that the net profit is large enough to be worth giving it a try barring unusual conditions or very pessimistic safety estimates.
Full essay: http://www.gwern.net/Melatonin
I looked up melatonin in FASS. The only melatonin based drug that's legal in Sweden is called Cirkadin. It has 2mg of melatonin per pill. It is a prescription drug, and only recommended for patients who are older than 55.
There are some side effects. Common ones are headaches, inflammation of the throat (lasting 1-2 days, they don't say if that's alltogether or after you quit melatonin), back pain and weakness (asteni). That's probably the real cost of using it.
Melatonin induces CYP3a in vitro. If it does that in the blood as well it will decrease the effects of several other drugs. It also increases the effects of some sedatives, and the effects of melatonin is influenced by several other drugs. So if you are on some important medication, talk to your doctor before taking melatonin.
Also, if you have liver problems melatonin will stay in your blood much longer than in gwern's, so you will be drowsy the day after you use it.