One of the things NOT to do is continue to lay in bed running through things in your mind, because you easily fall into the habit of doing that.
Never use your bed for anything other than sleep and sex, dont lay in bed and watch TV or read etc. it just puts your mind in state to do other things when you crawl into bed. Now as you climb into bed, your mind says Wheee, now we get to spend a few hours writing sql queries and stuff.
Sometimes just sitting in a dark room, doing nothing, or reading a boring book will make you want to sleep. Dont watch TV or switch on the comp, or you will really be awake.
Chances are there is just something on your mind that is laying directly out of reach of you thinking about it, and it will resolve itself within a week or so. Try to avoid alcohol, because it seriously screws with your sleep patterns. Just stay up and out of bed till you cant even keep your eyes open, then jump in bed and try to clear your mind.