When compression stockings are recommended after surgery, they should usually be worn as much as possible, day and night, until you're able to move around freely. Compression stockings are used after surgery to prevent blood clots developing in the leg, which is known as deep vein thrombosis (DVT).