The symptoms that you describe sound like a panic attack. It likely was in response to dreaming. In our dreams we sometimes think we are unable to move, or try to run and can't, etc. When you awoke, the feelings of fear continued and you experienced the panic attack. If it recurs, please keep a list of when it happens and describe the symptoms. Then see your doctor, and show him/her your list; there are medications and behavioral treatments that will help you.
Good luck to you.
Faye, RN, MSW