I know what you most be going through. I have insomia off and on where i just lay in bed and randomn thoughts are just continously going through my head (and somewhere in the background some part of mind is going "What the f--- am i thinking about?). I find that my insomina is usually caused by some sort of other factor like approaching midterms, final due dates, family deaths and so on. Once these things have come and passed i can usually return to a normal sleep pattern within a week or 2.
One other thing that tends to work is turkey, i can not believe no one mentioned this before. Mmmmm turkey.. Also having a potato, by itself or with the turkey, tends to help. By potato i mean baked potato and not a side order of fries.
Also try NOT doing any sort of strenous exercise within less then 3 hours before you want to go to bed. Due to the hormones and chemicals released in your body during exercise (things like adrenaline) will more likely cause you to stay awake then go to sleep.