I sprained my ankle during the week before last. Walking was painful for the subsequent few days but it was manageable. The pain was moderate but tolerable. Then this past Tuesday I fainted! And it's related.
The medical professionals tell me that I'm completely healthy, and what happened to me is a case of vasovagal syncope. Vasovagal syncope is fainting because of your body overreacting to certain triggers. One of these triggers is pain, and it needn't even be severe pain!
In my case, it happened about 20 minutes after I woke up. The first time I put weight on my ankle every morning still hurts, but on that morning it caused me to feel nauseas, faint—luckily only into a table, and the only damage is a little scratch on my neck—and come-to in a cold sweat.
The cause is a lowered heart rate and blood pressure that lasts only a few seconds, but this is enough to stop feeding oxygen to your brain and cause you to black-out. You can prevent it by lying down immediately, so that blood can reach your brain more easily.
This is the first time I've fainted and, whilst a little scary, was educational more than anything else. It's fascinating to know how your body responds to certain predicaments, and how you can respond to those responses when they're not ideal.