I take melatonin as a sleeping pill whenever I need to get to sleep, it knocks me right out with less grogginess the next day compared to over-the-counter stuff. My doctor later said it was hit or miss with different people, which is why you probably hear very mixed results about it. Still, I try to avoid taking it unless I really need to get to sleep on time - despite relative safety, no clue what weird longer-term effects may get reported in the future.
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.
Not terribly, I've found. I've just come off a pretty terrible stretch of insomnia (being unable to sleep for two or three days in a row every week for months), and what I've found helpful is taking a bunch of Vitamin D3, 8000 IUs a day for me. I'm 260 lbs, so you may want to adjust downward if you're not similarly large and male, because it is a fat-soluble vitamin.
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.
Good point about D3. I remember reading somewhere that it might also help to take them first thing in the morning. (I guess you're already doing that though).
Have you tried cutting out caffeine? How about exercise?
I don't think there's a peer review study, but in the quantified self community, it is common knowledge that you should take it early (5am - 10am) or you will harm your sleep instead of helping it.
I didn't have insomnia as bad as some on the thread and with the caveat that every case of insomnia seems to be different enough that there isn't a single fix for it:
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.
It's helped me a lot - a lot more than prescriptions, anyway. I have been taking it for a very long time, so I'm pretty dependent on it, unfortunately. Going to try and taper down soon-ish, but I haven't noticed many bad side-effects. YMMV though.
I have tried Puritan's Pride products and they helped me a lot to get over those ugly sleepless nights without the nasty and horrible effects of those sleep aid meds.