I've had this terrifying experience once with Teddy when he was about a year old. He had eaten a Texas Toothpick treat that upset his stomach. He vomited big pieces of it and passed out for a second or two. His eyes rolled back into his head, and I thought he was dying.



I did not think we would make it to the ER in time, but he came around.
The concern in a situation like this is aspiration, fluid and other materials going into the lungs, down the wrong pipe. It's like drowning, and can be fatal or cause serious lung complications.
The second concern is material getting caught in the throat causing a choking situation.
Talk to your vet about what to do. If your boy hasn't had a recent checkup, it would be a good idea to check bloodwork and his throat and lungs and heart.
If he tends to throw up bile in the morning, try having him eat a little of his regular food before bedtime. Another possibility is GERD, or acid reflux. Your vet can recommend a medicine regime to help with that and avoid the vomiting.