OS X sends a query to the monitor through the video cable when the Mac first boots or wakes from sleep, when you plug in the Mac end of the video cable, and when you hold å in Display Preferences and click the “Detect Displays” button.
If the monitor doesn’t answer with its display ID at any of these points, the Mac will conclude that there isn’t anything at the other end of the cable and will stop sending video data through it. The monitor, in turn, will drop to standby as soon as it goes a few seconds without receiving a video signal. It may be that your monitor isn’t responding because it’s only listening to the PC through the DVI port at the time and doesn’t switch over immediately.
You could try using the Detect Displays button on the Mac to send a few extra ID queries down the cable and see if the monitor catches any of them. If that doesn’t work, try cycling the power on the monitor first, before you plug it into the Mac. Even if this works, however, it’s a little inconvenient to have to turn the monitor off and on again every time you switch computers.