The New York Times now has an entire Opinionator section devoted to insomnia, which seems to be an occupational hazard among journalists. I have the especially annoying kind where you wake up early rather than (or in my case, as well as) finding it hard to get to sleep at night. This is especially annoying because all of the coping strategies advised for insomnia do not work for the latter kind; you're already in bed, not drinking caffeine or using a brightly lit screen. It's just that something woke you up, and now you can't turn your brain off.
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.