Hi and welcome to the community.
There are many possible causes for this acid reflux, asthma, and sleep apnea are among them. You need to see your doctor for an accurate diagnosis. Some of the causes are dangerous and require propper treatment.
Take care and God bless.
Or it could be sleep apnea.
sounds a little like acid reflux. r u eating late? if it is acid reflux, the cough may be from acid asperating into your wind pipe thus causing the need to cough. Watch out for eating right before you lay down and prop your head up with an extra pillow to see if that helps.