This was a problem with some of the G5 towers, so perhaps your iMac is included as well. On the towers it has to do with the processor and power save management systems. Apple has acknowledged the problem here: http://docs.info.apple.com/article.html?artnum=86523
You might be able to fix it by changing your processor performance options in the "Energy Saver" control panel. Experiment by changing the "reduced", "automatic" and "highest" menu and see how you go.
My G5 chirps sometimes during heavy network access.