You're experiencing wake from sleep that, in your most recent case, led to a thermal runaway. Wake from sleep issues are hard to pin down. If I were in your position and couldn't find the cause, I would do the following:
1. Take all peripherals other than those that came with your Mac off (USB and Firewire devices);
2. Backup your drive and do an Archive and Install.
If that does not cure the problem, start looking into potential hardware issues. First, pull any third party RAM you have installed and any other internal expansion components. If none of the above results in sleep stability, I would discuss with Apple the possibility of getting a replacement G5. New, just purchased Macs should not have to go in for "servicing."