Many people with computers running Windows 7 or Vista have experienced the system freezing/hanging when trying to wake it up from sleep, with many solutions proposed. The following procedure has almost eliminated the problem for me, with such episodes being very rare now.
1. Go to Control Panel –> Hardware and Sound –> Power Options.
2. For whatever power plan you are on, click on Change Plan Settings.
3. Set Turn Off the Display to Never.
4. Set Put the Computer to Sleep to 20 minutes (or similar timeframe).
5. Click Save Changes. You may need to repeat steps 3 and 4 until Windows believes you are serious about these settings.
This fix appears to work if the problem is caused by issues when only the monitor is shut off but the computer is still active. Since the monitor will turn itself off if the computer goes to sleep, there is really no need to shut off the monitor early if the computer is set to sleep within a short period of time.