Why sleep?
Switch it completely off.
Use button with two pairs of contacts.
One pair on each button connect battery + pole with processor power pin.
Second pairs to different inputs pins.
You push button, processor will start execute program, immediately read inputs status,
then send command and when you release button, it will be switched off.
If you need longer processing time and do not want hold button all this time, then processor can hold power itself by logical output with connected transistor. When work will be done, then switch itself off.
Your car remote key works the same way.