(Disclaimer: I have no independent validation that this works, but I’ve been doing it for twenty-some years.)
Meditation. I guess it’s meditation, anyway.
Lie in bed in a comfortable position, in the dark, eyes, comfortably shut. I like to lie flat and cross my arms over my chest, but something different may work for you. Now, relax every part of your body, one by one. I start from the head and go downward, but I suppose that’s up to you.
Don’t think “relax”; you’ve heard that, and tried that, a million times. Instead, concentrate on sending no motor impulses at all from your brain to your body, part by part. Start with your face; no one can see you, so stop telling your face what to do. Then the neck; your head is supported, so trust that and quit telling your neck what to do. And so on, throughout your entire body.
It gets difficult when you get to certain places like your chest (where breathing is involved), but you’ll learn soon how to stop controlling but still let your autonomous (?) nervous system keep working. For some reason my mouth is tough to shut down (insert joke here), but with a bit of concentration I can do it.
After a few minutes of this, you’ve allowed your mind to quit thinking about your body completely, and it will take off and pretty quickly get to sleep. It takes practice, but I started doing it at a young age, and I do it every night. Sometimes, when I’m really tense, it takes a while, and in fact muscles that have been tense all day will start twitching uncontrollably when I quit unconsciously flexing them, but if you keep going, they’ll stop.
Hope this helps; insomnia can be a bitch. I suggest you follow up on the other suggestions here as well, since they’re from people who seem to know what they’re talking about.