Phlegm can build up at the back of your throat when you lie down in bed and trigger coughing at night ... says wet coughs can also be caused by chronic lung conditions such as chronic bronchitis ...
Severe throat pain and white patches could indicate an infection like strep throat. Note that any difficulty with breathing is a medical emergency. Both COVID-19 and allergies can cause dry coughs.