Melatonin has helped, of course. But a few other steps I had read on a Reddit thread [0] also helped me - specifically the point about relaxing facial muscles. For some reason, doing this also seems to calm the mind and reduce random thoughts.
It is crazy how you can relax your face 4-5 times in a row getting less tense each time, and how well this method works to get you to sleep, especially after it has worked for a while so your body associates the relaxing with sleeping.