You can leave an electric fireplace overnight if you need to so that you can prevent the temperature from dropping low, but if you can turn it off, it would be better. It's a great idea to try to turn off the fireplace altogether and unplug it when you are spending prolonged times away from it.