Sounds like it could have been either a very realistic nightmare that sparked a panic attack just prior to waking (this is fairly common) or possibly even a
sleep paralysis episode.
http://en.wikipedia.org/wiki/Sleep_paralysis
I have had the former many times, but the latter is more rare and I have only had it once...but it was really frightening!
It will be interesting to see what others have to say about this, as many members here have sleep issues.
Keep working on your stress management to keep the waking and the sleeping anxiety down!:)
S.C.