I’ve experienced that too when I was pregnant. The feeling of almost dying and grasping for air. What I did was to stretch backwards so as to improve the room for my lungs to pump and have an air cooler blown infront of me. And also to drink water. I’ll feel better. On a side note, I applied some ointment on my chest area too.
Practicing good posture helps the lungs expand. Sleeping with pillows that support the upper back can also help give your lungs a little bit more “breathing” room at night.