A quick answer to get you started:
Apple has an online database of troubleshooting info and other misc. info. Search for "iMac G5 wake from sleep" in google. Some of those Applecare pages should show up, along with some other potentially helpful information.
Doug