I'm a chronic insomniac. Melatonin + something like Endel has honestly changed my life. I'm not a bandwagon person, but my experience with this has made a bit of a believer out of me.
It's critical to understand why you are not sleeping though. No solution fits everyone. It turned out melatonin was actually deficient in my brain. It doesn't work for everyone.