He sounds sick.
Take him to the Pediatrician tomorrow.
Does he have a fever????
Monitor him all night.
Babies... can aspirate on their vomit. Or choke on it. That is dangerous.
Keep him hydrated... if he can take in liquids/breastmilk/Formula or food.
If not, take him to the ER.
Let him sleep when tired.
Burp him.
Is he teething??? Sometimes with teething, more saliva is produced and they can't swallow it and it all accumulates in their throat... hence, they throw up.
Again, a baby/child can aspirate on that or choke.
Did he vomit while upright or lying down????
Don't overload him with liquid right before bed. It might come right back out.
Use liquids... in SMALL quantities... at a time. Like 1 ounce or less. Then wait. And see if he throws that up or not. Then proceed with small amounts of liquid at a time. As needed.
If he has a stomach bug... they can't take in large quantities of liquid at a time.