Is it possible to set my Mac to hide all windows on waking up?
You have two options, maybe more :


Automator: 


Make an Application document
Add the following action:


  Library -> Utilities -> Hide All Applications

Save the App
Add it to your login items 


  System Preferences -> Users &amp; Groups -> Choose your User -> Login Items

Voilà!, on next login all open apps will be hidden. Note that with this option, if the automator app have a window, that window will not hide, because this action is for Hide All Other apps





AppleScript: You can use this script, i found it on LiveJournal:



tell application "System Events" to set all_apps to the name of every process whose visible is true

repeat with a in all_apps
    tell application a to try
        repeat with w in (get every window)
            set miniaturized of w to true
        end repeat
    on error
        activate
        tell application "System Events" to repeat (count windows of process a) times
            keystroke "m" using command down
            delay 0.1
        end repeat
    end try
end repeat


Similarly you need to make this script runs on start of your session, maybe you could make an App with Automator but instead using "Hide All Application" Action, you add "Run AppleScript" Action.

In both options, maybe some applications will not be hidden because at the time this runs, not all windows are yet opened.