Could be food caused some kind of irritation or maybe you had a bit of norovirus. These go away on their own. You may have your sodium or potassium off so drink as much as you can if you feel good enough to and eat things with potassium like a banana, gatoraide, It should pass soon.
If you've not vomited again since that one time, I wouldn't be too concerned, especially if everyone else who ate the same thing is ok. It could simply have been a case of going to bed with too full of a stomach (I've had that happen to me before) - and especially since spaghetti can be pretty acidic from the sauce (which can also account for the burning in your throat).
It's also possible that it is just coincidence and you've actually picked up a stomach virus or somethign like that.
I'd give it a day or two - stay well hydrated, get plenty of rest - and see how you're feeling. If you're not feeling any better after that time, it would probably be a good idea to check in with your doctor.
To stay well hydrated while your stomach may still be a bit off can be difficult since you probably dont' feel much like drinking anything. You're better off taking small sips frequently rather than trying to drink a large amount all at once - it's easier for your stomach to handle small quantiities at a time. some good things, in addition to water are gatorade or other sports drinks (will help replace any lost electrolytes like sodium and potassium), gingerale (if you find the carbonation bothers you, you can let it "get flat" by sitting out open before drinking), popsicles or ice pops. Even just letting ice chips melt in your mouth is good - anything to keep your hydration going because as strange as it sounds, nausea can actually get worse when you're dehydrated - so it can go round and round - you don't want to drink because you're nauseas, but you get more nauseas because you're getting dehydrated.
I hope you feel better soon!