I used to be a horrible insomiac; finally getting to sleep at 4am and needing to be up for 7:30. I went to my doctor and he prescribed amytryptaline. It is a drug that is usually used for depression, but it has the nice quality of making one drowsy. I took it at precisely 7:15 to be ready for sleep at 11:30 and would be unable to keep my eyes open at 12:30. I stopped taking it about 8 months ago and now only have infrequent insomia.
Whenever I lay in bed, my brain starts churning. I have taken to listening to my iPod as I go to sleep. I listen to a podcast, which focuses my mind so that it can't think. As the program ends, I'm tired and am asleep within a few minutes. As an added benefit, this prevents wasted time of simply laying around, because I always listen to something like the BBC.