Side note: I visited a sleep specialist/neurologist a while back, who said the proper way to use melatonin was to take it in the middle of the day and stay awake until your regular bedtime. I haven't been using it like that, but thought I'd recommend looking into it first if someone is going to consider taking it. He was the expert, after all.
Taking four gelcaps in the morning has made all the difference in the world to my mood, and I actually sleep now, which is a huge improvement.
https://www.vitamindcouncil.org/blog/why-does-the-vitamin-d-...
Have you tried cutting out caffeine? How about exercise?
It is a http://en.wikipedia.org/wiki/Zeitgeber , and you might want to read http://www.gwern.net/Zeo
I found melatonin helped to get me started on a sleep schedule, but, in the long run, not as much as using f.lux and making my room as dark as possible at night. Got rid of my TV and listened to audiobooks instead.
I weaned myself off the melatonin supplements over a few months.
For the last two years I've been able to get a full night's sleep without much problem.
Some consumer organisations have tested the pills being sold and found wide variation in the quantity of melatonin in the pills.
In the UK melatonin is a prescription only medication.
Personally: I found it useful. I strongly prefer zopiclone. That preference might be connected to how insomnia affects me.
I found I had to up the dose to ~15mg to make a large difference. I went from sleep problems 1/4 nights to <1/10.