0. Connect AC adaptor, make sure it's plugged in 1. Check if screen brightness is not set to 0 - AFAIR it will be F1-F2 keys 2. Connect USB device like mouse/keyboard/pendrive - it can wake up 3. If 1&2 doesn't help - you can shut laptop down by pressing power key - then start it up and check Energy Saver settings 4. If it will stuck in sleep again consider resseting PMU, read Apple Support article - http://support.apple.com/kb/HT3964 5. If PMU reset won't help contact Apple - it can be kind of hardware problem
remove as much RAM as possible,
unplug all unnecessary devices (USB/FW etc) find and use CUDA button http://support.apple.com/kb/HT1939 If this not helps remove battery for some time (ie 1h) then place it again If none of this help, I'm afraid that you have a hardware problem :(
If it's orginal Superdrive that came with this G5, it's probably just worn out. Just replace it with any DVD cheap drive - in DTP Studio I was taking care of, I have to replace intensively used DVD drives every year.
Call from another office: "Macbook flooded with cup of coffee! Help!". "Remove battery, put some paper towels on keyboard, turn it upside down, send it to me". It was really flooded, even HD was covered with coffee, of course HD containing VeryImportantDataNeededASAP. I removed logic board from HD and washed it in denatured alcohol, dried, reassembled, and it worked. Macbook warranty was over, so I decided that I have nothing to loose. I took another Macbook, went to ifixit.com and started disassembling it completly - http://bit.ly/2cDOva. I washed keyboard and logic board in denatured alcohol too, lefr it for weekend to dry, then reassembled it. It worked like charm, I was pretty surprised :) and then accidentally I spilled denaturated alcohol on another Macbook, that forced me to dissasembly it too (thx ifixit again) and learned me a lesson: ALWAYS SEAL THE BOTTLE!!!