Sounds like croup
Croup is a barking (croupy) cough that is often worse at night (not all the time, necessarily).
Mild croup is a viral illness that lasts for 4-7 days and is typically more distressing than serious. Look for signs that your kiddo is having trouble breathing as that means you may need to get them to the er right away.
Answer assisted by David Miller, Medical Student