Here's what I do: an alarm goes off at 10:30pm and I take melatonin. If I actually shun devices, I can eventually sleep. But my brain is curious and wants to browse. I try to tell myself that I can in the morning. That sometimes works.
Lately I've been tracking my sleep with "sleep time". I also have a folder of sleeping and hypnosis apps that I cycle through. They talk me through relaxing muscles, calming my thoughts, deep breathing, binaral beats...
I've sleeped better lately and actually look forward to it some.
Also exercise seems to help, if I do.
(Edit: I'm enjoying the other tips here, thanks.)