I have a block heater on my truck to heat the coolant in very cold weather. However, rather than running it all night, I have mine on a timer that cuts it on about 3 hours before I leave for work.
It won't hurt a gas engine to idle a lot, however, a diesel will start to dilute the crankcase oil with unburned diesel fuel from excessive idling.