I learned a new technique to help get to sleep, and it's been useful for me so far. It's called cognitive shuffling.
Think of a word. Then think of words starting with its first letter. When that stops being easy, move on to words that start with the second letter, and so on. I don't think I've made it to the end of the first word yet.
It works kind of the way topical treatments that make your skin tingle relieve pain.. by replacing the pain signals with a different sensation.
Instead of having worrisome or planning thoughts pop into your head, you're eliciting the natural state of a falling-asleep brain where random thoughts occur, using focuses that won't keep you awake.