If you're lying down, there's not much to fight back against, and the socks will not be as effective. However wearing them while you sleep will tend to keep you legs warm as the compression provides increased circulation. ... You should put on your compression socks when you wake and take them off before going to bed.