Your electric fireplace may have a function that enables it to turn on once the temperature in the room has dropped below a certain point. This would allow the room to be kept at a constant temperature, much like a thermostat would do for a central heating system.
An electric fireplace turning itself on my also be triggered by using other devices in your home that have an infrared sensor, such as a TV remote or a games console controller.