Also, if you can't turn your brain off and are having trouble sleeping initially, 0.5mg of melatonin is wonderful and effective.
My understanding is that taking it consistently isn't a good idea. Using it the odd night that I'm restless seems like a good idea.
Here's another article mentioning that it should be taken for 3 months at most:
http://www.huffingtonpost.com/dr-michael-j-breus/melatonin-s...
Gwern has a page (with a very pro-Melatonin message) with lots of links: http://www.gwern.net/Melatonin
All the research I've read says that it makes absolutely no difference. You never develop an immunity to it and it doesn't inhibit natural production. No research (that I'm aware of) has yet to find a downside, even at regularly taken large doses.