You do consult your cardiologist to rule out any cardiac problems and also cough
can be because of the acid reflux
. When you lie down the acid with other contents from the stomach comes up to the throat causes irritation and cough. Few things which you can try is to take dinner 2 hours before you go to bed, use a bigger pillow and to lie on the left side rather than straight. Avoid coffee/tea/oily/spicy food for few days.
Dr. Naveen Kumar