Yes, it is safe to use a humidifier while you sleep. In fact, having a humidifier in the bedroom can help alleviate dryness and promote better sleep quality, especially during the dry winter months.