Insomnia has driven me mad mad mad. The best thing that seems to help me is to recite some sort of simple chant over and over and over until my brain, just from plain boredom just goes to sleep. I use "ohm nah may padme ohm" which is a buddist prayer. That way, I figure I'm taking care of two important needs with a single effort.
I wrote about it in my own WeBLog:
The Pain and Itch of Insomnia. If nothing else works, try drinking wine, chanting, counting sheep and melatonin while taking a hot bath.
Good luck,
-Karan