Yes, humidifiers and dehumidifiers can be used while sleeping. However, ensure the device is positioned safely, away from the bed, and follow the recommended safety precautions.