Do you want cause or effect?
Cause: bump to the head or not enough oxygen to brain. A bump to the head would be a defence mechanism from the sudden jostling of the brain to protect it. I think the same thing goes from a shock, stress, fear, pain… I don’t know for sure. Not enough oxygen getting to the brain is the reason why you get light headed and/or black out. Drops in blood pressure too.
Effect: your body goes vertical so the heart has an easier time pumping blood to the brain.