The only strategy I've found for dealing with either kind of sleeplessness is getting a prescription for Ambien. As Jonah Lehrer notes, one of the major factors contributing to insomnia is anxiety about the insomnia--you keep checking to see if you're asleep, and of course, that wakes you up. In my opinion, this is why insomnia tends to afflict most people after they get out of college--if you don't care about waking up at a specific time and functioning, you don't worry so much about falling asleep in the first place.
The interest thing about the Ambien is that I don't actually need to take it very often. Just knowing I have it there as a backup alleviates much of the anxiety about sleep. When I have a particularly big day that I know will get my brain going a mile a minute, I take an Ambien CR. But a prescription for 30 pills can last me six months (which is just as well, because doctors get nervous about refills for some reason.) Sadly, unless I take it every night, it doesn't do much for the early-morning sleeplessness, except insofar as it allows me to make sure that I get enough sleep before the days when I'll really need it. But half a loaf is better than none.
This article available online at:
http://www.theatlantic.com/entertainment/archive/2010/03/searching-for-sleep/36871/
