It could be allergies, such as to dust mites or something you wear for sleeping. Also, have you been tested for Asthma? Sometimes Asthma can occur at night and then when the asthma settles down, the body tries to get rid of the extra mucus produced by the inflammation in the airway. Acid reflux may cause this as well, because of the irritation that can happen when refluxed material gets into the airway.
Might be interesting to see what a pulmonolgist or allergist would say about this.
Chronic Lyme Disease, Gluten & Sulfite Sensitivity, Many Food/Inhalant/Medication/Chemical Allergies & Intolerances, Asthma, Gut issues (dysmotility, non-specific inflammation), UCTD ("Secondary Lupus-Like Syndrome"), Osteoporosis, Pancytopenia, chronic malabsorption/malnutrition, etc.; G-Tube; Currently TPN-dependent.
Meds: Zofran, Pulmicort, IV Ceftazidime, Heparin (to flush PICC line), Claritin, Colloidal Silver (used topically), probiotics, homeopathy.