Edema can be caused but any number of things. Mom has swollen ankles from time to time. Hers is probably because she is wandering the entire time she is awake. It can also be caused but sitting and not standing. We are designed to sit a while and stand a while and when you do one of the other too long it can cause edema in the ankles. Too much salt in the diet can also cause edema.
Medications such as vasodilators that open the blood vessels, NSAID's such as tylenol, and some diabetic medications can have a side effect of edema. Illnesses that can cause edema as a symptom are congestive heart failure, kidney disease, liver disease, lymphatic compromise, or damage to the leg veins.
It is caused when the blood vessels leak fluid. I have had Mom checked out several times by the doctor and he didn't seem overly concerned due to the amount of walking that she does. We have reduced her sodium intake.
It is more than likely caused by immobility if she is non ambulatory from the s stroke... or could be cause by some medication they are giving her to thin the blood or dilate the vessels. I would suggest that you check with the doctor to make sure everything is ok