when you're dehydrated, you should drink the water slowly in small doses, otherwise you're very likely to get sick
so if you drank a lot all at once that may be why
also you should wait a few minutes after drinking water to lay down or that can make you sick too