Your cough when you lay down, cause your airways relax, and this affects your breathing, so you cough xx
I sleep at about 15 degrees when you sleepy our throat and chest realax and flem builds up clogging the air ways so you cough sleeping in a siting up position helps keep flem frome checking the crap out of me
When I first lie down I use a 12" high wedge pillow to not lie flat, but once I feel drowsy I will flip to my side and sleep on two pillows along side the wedge pillow. That has eliminated the coughing and congestion by doing so.
I bought a adjustable base frame & mattress the incline can help. Also
do a nebulizer treatment before you go to bed it might help.
put your head on 2 pillows dont lie flat i have just got rid of my cough