Sprints cause my glutes to tighten?

I was running 150 meters of 3 reps and 2 sets and after the first or second run my glutes really started to tighten to the point where it was uncomfortable to stand and it felt like it was on the verge of cramping (probably because of my poor water consumption). My hip extensors also tightened up and are still tight right now. I was wondering is there a way I can prevent those things from happening again? Is it because of my poor running mechanics that I am tightening up in my glutes and hips? Or is it a lack of flexibility I have from sitting down all day like right now on the computer?