How severe is the cough? Many kids vomit after a severe bout of cough.
He might need medications for his cough based on presence or absence of chest signs.
He might also need medications like Lansoprazole
for few days to control acidity and reflux which may also produce such symptoms.
Its better to get him seen by your doctor who can examine him and guide accordingly.