Coughing but only when sleeping?

Ma

My daughter has been coughing for 4 days now but it’s ONLY when she’s laying down trying to sleep no other time. Has anyone delt with something similar or does anyone have suggestions on what to do. I call the dr and made an appointment but they cant get her in until the second week of September.