Insomnia Support Group
Insomnia is a symptom, rather than a disease, and is characterized by inadequate quantity or quality of sleep. People with insomnia complain of difficulty falling or staying asleep, which results in significant impairment of daytime functioning. Insomnia is categorized as transient (shorter than one week), short-term (one to three weeks) or chronic (longer than three...

Just wanted to let you know you are not alone in experiencing this. I have too. Many, many others on this board have also expressed similar experiences.
It's one of the worst aspects of insomnia to me ... being dead tired, desperate for sleep, then beginning to actually fall asleep, only to be jolted back awake at the last second by what seems like a shot of adrenaline. A pounding heart and night sweats may then ensue. This is happened to me more times than I care to remember.
What commonly causes this is hyperarousal. This typically results from unrelenting stress and/or anxiety experienced nonstop throughout the day, and often well into the night. This leads to the body's production of cortisol, among other stimulating hormones, that make it more difficult to sleep. That may or may not be the case for you, although you have described anxiety-based insomnia.
I do think you should see your doc for a checkup to either treat or rule out any underlying medical issues or a possible anxiety disorder. These are treatable. But don't be surprised if you have no true underlying medical or psychiatric issues. Most insomnia sufferers don't.
In that case you can look to nonmedical root sources, such as normal but excessive levels of anxiety and stress. There are nondrug ways to treat this, permanently. By understanding and learning how to turn off the anxiety-producing negative thought patterns, cortisol levels come down and better sleep returns.
Hypnos07, that was incredibly helpful what you said about cortisol. On some nights I actually need to stay at work and I have to sleep at work. On these nights I suffer the most. I need to be on call if someone needs me, so I can't really take any sleeping medication. It is great to understand why that's happening to me