Yes, you can wear it while sleeping in case of any leg swelling or leg pain. Once the pain is alleviated you may need to wear it while sleeping.