

Count from 1 to 10, then 10 to 1. With each number, relax your body a little more. When the mind strays, bring it back to counting. Repeat until unconscious.
If that isn’t working at all, get up, go to another room, play soft music at low volume on headphones, and depending on the circumstances read a book, jot stuff down, or just contemplate stuff. Chill until sleepy, then either go back to bed or just curl up where you are.
Anyone who asks this IRL gets to hear my entire life story, 'cause that’s the only answer I can come up with.