How can I maintain switch state when in sleep mode?
You can get a latching relay. These come in two flavours - Unipolar, where you energise one pin to turn it on, and energise the other to turn it off, and Bipolar, where the direction of the current through the coil turns on or turns off.

Unipolar is easier to drive since you just need two transistors, diodes and resistors. Bipolar is harder, since you need a H-bridge (motor driver), but requires less wires to connect it up (2 as opposed to 3).

In both cases it is just a short pulse that is needed to switch the relay into a different state - there is no need to maintain the output, so is ideal for deep-sleep mode where everything is turned off except the RTC.