The reason I hypothesise this happens is because as you sit and relax, your breathing slows. If you do this long enough, body functions also slow to a certain degree. if you try to move very quickly, your body tries to compensate by speeding up your blood flow and heart rate. as you have been sitting down for a while, the oxygen content in the blood stream is low, and when you rapidly move, your body pumps the low oxygen blood quickly, but it does not have the required amount to keep your brain fully supplied with oxygen for a short while. this coupled with the sudden movement and the brain shifting its position in the skull can cause this effect.