Thanks (not really) to your hormones, diameter of you veins increase. Furthermore, a new venous system develops for your baby and the weight of your growing baby press on the biggest vein of your body the vena cava.
The combination of these 3 elements prevents the blood to come back normally from your lower limbs to your legs, creating sensation of heavy legs, welling and varices.
On a long term, it also causes cellulite.
NB: this reduce blood return can also cause dizziness in pregnant women when lying on your back.
Specific exercises also help to reduce swollen leg during pregnancy. We demonstrate them in this video: