It has at times worked well for sleep. One thing I've noticed though is that nothing works consistently for me. While weed and/or melatonin helps me get good sleep, both can leave me groggy/hungover during the day. What's weird is that I don't mean it varies night-to-night, but like for a period of, say, 9 months I'll sleep better on melatonin then it starts to leave me hungover so I'll switch it up and try weed and maybe it works fine for a few months then I get daytime sleepy/sluggish.
Recently I just quit everything yet again and now I sleep well for 6.5 hours, wake up refreshed, and have a lot more alertness and motivation during the day. My past experience says this will last for a while until I yet again find I need weed or melatonin to get more than 4 hours. I don't get it.. probably other factors in my life affecting my sleep.