I have trouble sleeping when I just about go to sleeping I start gasping for air in some sort of panic what can it be and what can I do about it?

Sleep Apnea. What you are describing sound like signs of obstructive sleep apnea. Please see your primary provider for a health check and consideration for a sleep study to rule out this sleep disorder.
Be seen. Although, it could be sleep apnea, patients with cardiac failure are not able to lie flat because their heart can not pump the fluids away from their lungs adequately and they feel like they are short on air when they lie dwn. And if one does have cardiac failure, sleep apnea needs to be ruled out as it can worsen the problem. As dr balogun suggested, patients with such complaints need to be seen!