Deep sleep time and switch state

I’ve configured two ESP32 boards : the first acting as a BLE server and the second acting as a BLE Client.
All works fine and I can send switch state ON/OFF from Home Assistant to the BLE server.
Neverthless, if I configure a deep sleep time of, say, 58 secs and a wake up time of 2 secs on the first ESP 32 (acting as BLE server) , I can send switch state only in the 2 secs window of wake up time.
The question is, is it possible to store in anyway the switch state (ON/OFF) so that when the ESP32 BLE server is awake it can retrieve the switch state even if it was switched (from Home Assistant, obviuously) during the 58 secs of deep sleep time?
Any idea?
Thanks in advance.