4 month old cough

My 4 month old has a terrible cough and can’t sleep because he coughs and gags all night what can I do to help him??!