Dude, I try to avoid things pre-bedtime that get my mind going or things that are overly visually stimulating, like video games, but sometimes I just can't fall asleep. I'll lie there, unable to sleep and feeling like I've been awake for 1,000 years. Insomnia suck ass!
Try to monitor what you ate before you had insomnia, sometimes eating certain things as long as 6-7 hours before sleep time can keep you awake.
My mother was having trouble sleeping for a long while, she eliminated a large part of her insomnia just by not drinking coffee after like 3pm. *shrugs*