You could leave it plugged in forever if you want. As long as it conducts heat away from itself, it won't harm it.
I just meant more than 2 hrs is a bit of a waste - at that point the engine won't get any warmer & it's just heating the air around the engine. It'll be up to (or very close to) equilibrium of energy in -> heat lost to the surroundings.
View my fuel log 2015 Micra S manual: 5.0 L/100 km ... 56.5 mpg (Imp) ... 20.0 km/L ... 47.0 mpg (US) ...