Target iMac does not wake up with the main iMac
You can bring it back on by going to System Preferences / Displays and choose Detect Displays. It can take a couple of minutes to get it back, though.

Apple suggests a SMC reset when a computer that supports target display mode does not switch into or out of the target display mode as expected.

To do so, just:


Shutdown the computer which is not functioning as expected.
Unplug the computer's power cord.
Wait fifteen seconds.
Attach the computer's power cord.
Wait five seconds, then press the power button to turn on the computer.