Have you checked to make sure that the heater isn't plugged into the light timer? If you have the nice convenient single external plug that I have seen talked about on European made tanks, you may have something like that going on. You bring all of the tank's electric features to a single external plug then all features go off when the timer turns the lights off.
I see this time Mini Matt beat me to it.
I see this time Mini Matt beat me to it.