Hello and welcome. Panic attacks are very scary even when you know what is happening. I used to wake at night with panic attacks and it was not pleasant.
Have you talked to your GP about this? While it sounds like a panic attack and subsequent panic or fright in case it happens again, I cannot tell you because I am not a doctor. I think it's worth checking out properly and possibly taking some medication to get you back to normal, so to speak. I'm sure you are not keen on meds, who is, but it may help for the immediate short time to get you feeling good again.
The more tense you get the more uncomfortable you feel and more worried. So it goes on in a never ending circle until you can break the cycle. Have you tried meditation at any time? I find once you can relax into it there are good results for anxiety. Yoga is another way of feeling better about your body. Going for a walk is good before bed but may not be the wisest thing to do.
The biggest obstacle to getting good rest is yourself and fighting your fears. Going to bed and wondering how many times you will wake up before morning does not bode well for a good night's sleep.
I hope some of my suggestions prove useful. Please continue to post in here for as long as you wish.