Thank you for sharing your terrible experience.
There can be many reasons for this experience. You could see your own trusted GP to try to figure out.
1) Some people have sleep conditions like night terrors.
Could be triggered by other conditions like huge events in your life or some particularly traumatising experience. Would benefit from brief psychological intervention, mindfulness and relaxation or psychotherapy.
2) Some people have medical conditions like acid reflux. Might need further testing or treatment.
3) Whereas some could have asthma. Asthma can be diagnosed at any age, and certainly could have a first asthma attack at 22 years old.
4) Other conditions like obstructive sleep apnea, where people can "choke" and feel out of breath during sleep. This might require further testing.
I think in short, you should see your trusted GP to start to figure out which one you are more likely to have.
Take care.