In the relay actuator example the methods saveState() and loadState() are used. The current status of the pin (RELAY_ON or RELAY_OFF) is stored in the EEPROM with every change and restored after a restart of the node.
The node will return to the last known state after a restart.
BUT: while restarting the state of the pin may change (from on to off to on again while booting up). In case you want the relays to stay activated while booting up you may use an external pull up.