Hmm… Update: all was going well for a good few days, then problems reappeared. The iMac started locking up totally. Sometimes after hours/days of up-time, then, more frequently, a few minutes after restart. What with the constant crashing of Illustrator CS5 upon wake, I decided to clean-install Mountain Lion.
For some reason, the iMac wouldn't complete the install from a USB stick; left it running overnight (claiming there were 3hrs or more to go) and awoke to a dead iMac. Had to install it over Firewire from a MacBook Pro.
Then tried to reinstall a Time Machine backup… again it crashed out a sixth of the way through. Wondering if allowing the machine to sleep was causing problems, I ran the installer again, tickling the iMac to keep it awake throughout. Success.
I've just returned to it to be greeted by the log in screen. It had spontaneously restarted itself again. I'd left it with only Chrome and Suitcase running.
Wondering if it's Adobe CS5-related, I'm uninstalling it now and will reinstall.
Following the Transmit menubar item thread, I also noticed I had a Growl menubar item too… I've removed that in case that was proving troublesome.
I've also set up a parallel user account so if the issue persists, I'll see if the restarts happen in that account too.
Very frustrating!