What would of happen to me if I fell asleep with the stomach flu?

That's ok. You need rest. Start w clear liquid like water, slightly flattened soda that is clear, or sports hydration drinks. Sip, sip, sip. Work up to solids w bland foods like bananas, rice, applesauce, toast, gelatin, or chicken. Avoid alcohol, nicotine, caffeine, dairy & high fat foods. Rest.
Would get some rest. The 'stomach flu' is typically a viral infection which causes vomiting for a day, followed by diarrhea for several days. It generally resolves on its own, but is very contagious, so good hand washing is important to minimize spread. Sleeping would just allow you to get some needed rest. Unless you have a significant neurological problem, the risk of aspirating your vomit is slim.