This isn't good. Usually this is the first sign of systemic failure.
First thing I'd do, given the age of the system, is Google bad caps and then inspect your system for those. Fortunately the PowerMac G4 case design makes this an absolute breeze. One pull of a lever and the whole thing just falls out right there for you. Also inspect the video card.
If that doesn't work, and you have a spare AGP video card that is supported by 10.4, give that a shot. If that doesn't work, then there's a small possibility there's an issue with your OS install, but more likely is that your logic board is going out.
Another good thing to try, is taking your OS install DVD, put it in the drive, reboot holding down the "D" key. This will boot the Apple Hardware Test. Let that run and see if it finds anything. You can also optionally look for the version of Apple Service Diagnostic for your particular model. It's a more comprehensive version of Apple Hardware Test. These are just some good things to have around in general, and you can download them off of Apple's website.
Machine Name: Power Mac G4 (AGP graphics) Mac OS 14.4.11
Machine Model: PowerMac3,1
CPU Type: PowerPC G4 (2.9)
CPU Speed: 400 MHz
L2 Cache (per CPU): 1 MB
Memory: 1.38 GB
Bus Speed: 100 MHz ATI Radeon 9200,Dell2208WFP,1680x1050
Previously when computer an display would sleep I would hit the space bar and desktop would come on. Now I have to shut the display and turn it on again for the Desktop to appear.