this actually happened to me a lot in high school. i'd get sick and vomit at 6 when i had to get up for class, but by 7 or 8 i'd be fine again and stay fine for the rest of the day. the doctors had no idea what was wrong, so they ordered a slew of tests including Barium and even a Colonoscopy. this yielded pretty much nothing so they told me i had acid reflux disease and put me on Prevacid. it stopped.
i hope this helps :)
Does the amount of sleep effect this?