Apparently Hab reserve power is not getting charged according to how much time went by when you rest during daytime. This is especially a problem when you take a longer rest period that starts before sunrise and (with possible short breaks) ends after sunset, since you may end up running out of power during the night. (And while I havent specifically paid attention to it this time, but it may actually be true for the water and oxygen production too.)
I'm not sure if it's a factor in this, but I noticed this to happen with a Hab at which the Electrical system is powered only by an RTG but no solar panels, while the rest of the systems are powered by a sufficient amount of panels. It may also worth noting that while an RTG should be generating elecrticity regardless of time of day, it appears to follow the same daylight cycle the solar panels do, as the Electrical subsystem switches to not charging/not meeting demand mode at sunset as if it was powered by solar panels, despite being actually powered by an RTG.
Customer support service by UserEcho