Get your pulmonary function tested. The reasons for coughing while lying flat are numerous...some benign and easily treated...and others that are more critical and need to be addressed ASAP..
I'm going to have to check into that myself. My dumbass General sent me to a Gastroenterologist who sent me to get a Cat scan on my lower digestive tract. I still have the cough:wtf: