Yeah, ths happens to me sometimes, went for a while where i just couldn't sleep without a good ham-shank. But I go through phases where i can't get to sleep no matter what. I find that if i can get some excercise during the day, it helps me get to sleep. But if you're still having trouble, and the excercise doesn't work, don't lie in bed waiting to fall asleep. Get up! Do something boring and monotonus. Clean the oven? take the dog for a walk? the ironing. Anything, but whatever you do don't lie in bed. Only go to bed when you're actually about to crash, that way you start conditioning yourself.
And, if i'm going insomniac, especially coming up for exams, i always stock up on Sweat Dreams, which is a really good sleeping tablet. It doens't leave me with a hang over the way other tablets do. But everyone's different, so if one tablet doesn't work, try another (just not that night)
But wanking's also good, cheap, and releases loads of hormones, de-stressers, basically it's a wonder drug. Go for it. It's good for you!
Good luck