Are you forgetting to breathe properly? Breathing is huge during training. When you take conscious action towards engaging in full inhalation + exhalation, it can make a big difference.
This would happen all the time to me during overhead presses. I would get wicked light headed after heavy sets, but then I started doing slow and controlled deep breathes before my sets (really engaging the diaphragm and drawing the abdominal cavity downward, and I was fine. Same with deadlifts.