Dehumidifiers can be safe if left on overnight. Most dehumidifiers can run overnight with relative ease. Make sure there are no errors in its path (maintenance, air flow, no blockages, no leaks). They are very safe to use overnight. The device should have an auto defrost mode, but if it overheats for any reason, it will turn off.
Check out our best pick dehumidifier Whynter AC 13000 BTU.