I'd personally be inclined to say that it's the switchbox's fault. My understanding of DVI is that it's bad to disconnect the signal due to handshaking in the DVI protocol, and perhaps the switchbox isn't handling that properly.

Try running a cable straight from the monitor to the Mac, unplug it from the Mac and plug it into the other device. Wait for the sleep mode. Unplug it from the other device and plug it back into the Mac. Wake the Mac up. What happens?
_________________________
Bitt Faulk