Ok, looks like I've fixed it!
I opened the iMac, removed the optical drive, then re-inserted it making sure the IDE connector was pressed in tightly.
Since booting up again, my drive is now listed under ATA in System Profiler (it wasn't after it stopped working). I have imported 5 music CDs so far, mounted DVDs, CD-RWs and DVD-Rs and none been thrown across the room as before.
I can only assume that the reported excessive internal heat of the iMac G5 has caused the IDE connector to buckle in some subltle way and interfere with the IDE pin alignments.
Now all seems fine. Bizarre!
There are instructions from Apple on how to reseat your optical drive below:
http://www.apple.com/support/imac/assistant/optical/35.6.html
Does this work for anyone else?
iMac G5 20" 1.8Ghz 1.5Gb Mac OS X (10.4.3)
iMac G5 1.8Ghz Mac OS X (10.4.2)
iMac G5 1.8Ghz Mac OS X (10.4.2)