How to wake the screen from terminal?
That sounds like your Mac is actually sleeping (suspend-to-ram) and not just turning it's screen off. If the screen was just turned off, simulated mouse/keyboard input from Synergy should wake it back up. If it's sleeping it won't, because your Mac isn't listening for Synergy network traffic when asleep.

You can either adjust the power save settings to only turn the screen off, but not actually go to sleep (but then you're sort of already doing that via Caffeine when you remember to) or wake the Mac via a Wake-on-LAN magic packet that will awaken it even from sleep mode, which can be sent from a command-line utility on the Windows machine.

If that doesn't work to your satisfaction you can also wake the Mac up in scheduled intervals via pmset (see man pmset for more information). For example, to wake up every Monday to Friday at 8:30am:

 pmset repeat wake MTWRF 08:30:00