I experience insomnia from time to time myself, especially if I have something important the next day. I found a couple of solutions for insomnia. I generally don't agree with exercise or extreme diet changes, but reduced caffeine intake after night will sure help.
Here are my solutions:
1. Sleep around 10 or 11 pm.
Since you said you wake up in the middle of the night and can't go back to sleep. You should sleep late at night (around 10 or 11 pm), but not too late. This time I think is best for anyone to sleep; not to wake up in the middle of the night, and to wake up early in the morning. Our body is adjusted to a biological clock that is best active during the morning and least active during night. Try this sleep around 10 or 11 pm one night and wake up early, sometime you would notice that you don't even need to wait for your alarm. Also, try to sleep around 2 pm and you'll notice that you would probably not wake up until midday. Sleeping early; not too early, and not too late is your best bet.
2. Read part of a book or watch part of a movie.(Brain sleeps first)
Usually, when we go to sleep is most relevant to our exhausted brain, but not physical exhaustion through exercise. So, keeping your brain active by reading or focusing on a movie could eventually drain the energy from your brain and make you feel sleepy. Don't you remember how you feel sleepy and tired, when you start studying for an exam.
3. Eat and drink light, and reduce caffeine.
Eating and drinking light before you could go to bed is important. First you will not feel hungry or thirsty at night. On the other hand, too much food could make you feel and comfortable during night. Needless to say, this will help you develop a good-sized belly, like mine, but before.
Definitely reduce caffeine drinks like sodas, coffee, and tea those will keep your brain alert, which you don't want.
In summary: sleep, but not too early, eat light, and read something if you need. All this should help you have a deep sleep and wonderful dreams.