I've dealt with it since my earliest memories.
Here are the things that can help:
1. consistent sleep hours
2. no caffeine within 5 hours of sleeping
3. hard exercise later in the day
4. reading a book before going to sleep to take your mind off things
5. reduce liquid intake within 4 hours of sleeping
6. 1/5 dose of Nyquil to stop mind spooling up, when trying to get to sleep, needed every couple weeks
Some people use melatonin, I don't like it's side effect of making me feel drowsy for days after using.
I mostly agree with this list but I don't do #6. I regularly use 5mg of melatonin half an hour before I want to fall asleep. I have no side effects from it. Taking 600mg of ibuprofin helps me stay asleep longer.
Because of the consistent sleep hours - I head for bed at 9:00 and am generally asleep by 9:30 - most nights work the same for me as to falling asleep. One item not on the list is to not do anything active, mentally or physically, within an hour of bedtime. Settling down for an hour is a big part of being able to fall asleep for me.
But my other issue is that I'm wide awake three to five hours after falling asleep. It takes me an hour or two to get back to sleep, but I eventually get enough sleep overall. What I initially did more than ten years ago when this started for me was to get out of bed, lay down on the couch, and watch some sort of documentary. Originally, out of about 200 channels, the "military channel" was the only one I could count on to not have some stupid infomercials at night. The big problem with that was that I was learning way to much about Hitler.
I have since gathered approximately 500 episodes of Modern Marvels from the History Channel and have those going for the rest of the night, with the volume low enough that I can barely make out what they're saying. There are dozens of episodes available on YouTube, commercial free. It makes a difference that the person speaking has a steady voice, no exciting parts, and very few other sound effects. When traveling, sometimes I'll have my phone read the Bible to me, which works similarly, for a few of the books in there.
What doesn't work is getting up and reading or doing anything on a computer. There might be some audio books that would work, but I haven't searched for any of those.