In this Intelligent sleep/energy saver? thread on the forum site, Novajo offers up a script that can be used to put your Mac to sleep based on CPU load. The script is quite short:
set theLoad to do shell script "uptime | sed 's/.* //g'"Save the script, make it executable, and then use 'cron' to schedule it to run at regular intervals, and your Mac will put itself to sleep when the CPU load has been below your threshhold.
if (theLoad as number < 0.8)
tell application "Finder"
sleep
end tell
end if
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020212134437163