welcome to health care magic,
you could have suffered a vasovagal attack, but they are many reasons for the swelling to be there these include,
- heart failure
- deep venous thrombosis
i would suggest visit a physician to rule out above causes and to be given the right treatment.
hope to have answered your query.
wish you a quick recovery.