I also experience this.
It might be worth seeing your doctor, especially if you're particularly at risk of sleep apnoea.
I would say though, that it's more than likely mental health related. Being particularly anxious or stressed out can make this "gasp" thing happen.
If it's really bothering you, try to do what you can to make your sleeping environment better... make sure the space is calm and free of clutter and electricals.
I know it's winter, but also i've found having a fan next to my bed helps me breathe better.