Had a scare last night breathing!!

I was sleeping on my left side. Usually don't because it's difficult to breathe. I woke up coughing and I couldn't catch my breath. I almost passed out gasping. I could hardly breathe. Scared my husband and I very badly. Noticed lately it's harder for me to take deep breaths. Any one else experiencing this?