dehydration, IMO, is the most common cause of this.
quick change in temp, ie no cooldown, is a possibility.
improper breathing, which causes lack of oxygen stated above, and just sheer fatigue. if you've done a real hard set of squats, breathed properly, and still thrown up all over the floor you know what i'm talking about here.