Major abdominal surgeries like hystrectomy , specially complicated ones can reduce your mobility and put you at a risk of clots in your legs that can be rarely become life threatening.
. We regularly use compression
stockings while patients are in the hospital to prevent this. This is why your doctor wants you to use compression stocking till you are fully mobile and back to normal.