Yes. This is something that I frequently see after a stroke. I think it is important, particularly in the case of your leg, to make sure there is no clot
in the veins of the leg. An ultrasound should easily verify that the veins are open. Ask your doctor to evaluate your leg and order an ultrasound if they think it is appropriate.
I've never been entirely clear as to why this swelling develops, but I think it has to do with fluid build-up from immobility, and possibly due to poor vascular tone from lack of neuronal control. The best way to deal with the problem, in my experience, is to wear tight stockings and to elevate your foot when possible - to allow the fluid to drain out.