More good advice about sleeping from Vox: How to sleep better
I agree with most of this, but there is one part I want to highlight:
If you’re not sleeping and getting anxious about not sleeping, just get out of bed and leave the bedroom. Sleep specialists have established that staying in bed while you’re anxious or not sleeping is one of the most common contributors to chronic insomnia, because it trains the brain and creates bad associations.
The part in italics is key. If you are not getting anxious about it, you likely can stay there until you fall asleep. At least that works for me. I have tried getting up and I find that more disruptive. Now when I can’t sleep, I tell myself that at least I am getting rest and I will likely fall back to sleep, and almost always I do.