Thanks Cozar, you're pretty much right... thought it might be CS5 suite that was causing the problems as it keeps crashing, but it turns out this particular bug is down to a known bug: the Mountain Lion Wake Bug, triggered by apps using Bonjour - Transmit in particular. I unchecked 'show transmit disk in menu bar' and the freezes and restarts have stopped. Phew!
Spotted the tip here.
Now just have to decide whether to upgrade to CS6 to stop Illustrator crashing after sleep...
Thanks for your help!
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.
Clean install 10.8, Time Machine old user across, uninstall CS5, reinstall from DVD. CS5 app still crashing on wake from sleep.
Log out, log in to new user account, load Illustrator, InDesign and Photoshop... sleep... wake... no crash.
Go back to full account, check login items... incompatible items - namely: Stuffit. Uninstall Stuffit using CleanMyMac, uninstall the pref panes along with other incompatible ones and non-essentials, leaving me with networked drives, SMARTReporter, FreeMemory and SFCoreHelper (All Users)...
Log out, log in, load Illo, InD & PS... sleep... wake... no crash!
No. Spoke too soon. InDesign just crashed after a sleep/wake cycle.
This is probably for another thread rather than here, so I'll sign off but will report back on the spontaneous restarts.