The valsava will create a higher pressure in the abdomen and thorax, and thus help to keep the torso rigid. If held only for the moment when this rigidity is most needed (ie: the first pull in a deadlift, getting out of the hole in a squat, etc.) and then released, it is helpful and not really harmful. If held through the entire lift, then it may become a problem.
To the OP, here's whats happening
At the time when it is held, blood pressure sky rockets. When the hold is taking place, blood flow (and oxygen) to the brain is minimal due to constriction of arteries and veins in the throat/neck area. When it is released, the pressure causes a fast draining of blood from the brain into the now open veins, and there is a moment where the draining from and supply to (the head) is mismatched. Thus, oxygen delivery to the brain is inadequate for a portion of time and you get that light headed feeling. Same occurs when standing up too quickly, especially in people with orthostatic intolerance.
Br