You don't mention whether your son has been diagnosed with asthma, but it's fairly common for asthma symptoms to be worse at night (for reasons that aren't fully understood).
The other possibility is that acid reflux is causing the cough. For many people with reflux, lying down causes stomach acid to irritate the esophagus and causing a persistent cough.