How to prevent sleep while a Time Machine backup is in progress?
I have solved this with a bash script. It involves caffeinate built-in command and NoSleepCtrl (prevents sleep on lid close).

In my setup, I have TimeMachine disabled and run it using this command. It should not be difficult to create a wrapper, which would execute it periodically and either ask user for confirmation or wake the computer up and do it automatically.

My experience and steps for TM backup corruption on QNAP.