Last night when I went to bed, I was extremely stressed (just the whole day in general) but also very tired. For almost 2 hours I was in this constant state of ALMOST being asleep but as soon as I felt I was going to drift off, my heart would start pounding like crazy and I would have to gasp for breath. It's scary and this has never happened before until last night.

Sometimes it would happen very mildly, where I'd just take a deep breath through my nose and it would go away. But a few times it happened so intensely that I sat bolt upright (from almost being asleep), gasping for air and clutching my chest. This caused more anxiety and I was just wondering if anyone has had this before.

After I finally got to sleep it went away, I'll be curious to see if it happens again tonight, but could this be caused by my anxiety? I don't think this is sleep apnea, because it would only happen for the first breath, and immediately after I could breath just fine, and position didn't seem to change anything. I don't have any tonsil or throat problems, and don't snore. Help would be appreciated