When I can't sleep, (which is most of the time, unfortunately), I try progressive muscle relaxation exercise. I try warm milk, try NOT thinking about what may be the cause of my not sleeping, I try not thinning about the fact that I'm not asleep.
But, my doctor did say a long time ago that I should not say in bed longer than 20-40 minutes, if I'm unable to sleep. I ought to get up and relax and wait until I'm tired again and then go back to bed. But, when I've gotten up, I should watch what I do. No coffee, watching an old movie is ok, reading a book is ok (but not a heart-pounding thriller!).
Then, usually, I'm sufficiently tired after 1/2 hour and when I go to bed, I fall asleep right away.