Vomiting with cough at night happens because of the build up of mucus in the posterior pharynx, and the throat. In the day time the mucus is either ingested or coughed out, but at night, it collects and causes temporary obstruction, due to which child coughs violently and expels the mucus with vomiting.
It is common Flu.
Next Steps
give the child over the counter decongestants and antihistaminics, along with mucolytics.
an antacid with steam inhalation.
for detailed prescription, please consult a pediatrician.