I've read of Mac Pro users having this problem on non-standard video cards, but never an iMac. I guess if it were my mac, I would try this.
Disconnect all but keyboard/mouse
1) Reboot and at the chime, hold D....This should invoke apple hardware test. If this doesn't work, reboot and hold Option-D This is the internet version of Apple hardware test. Run the test just to make sure you don't have a hardware problem.....if good
2) Reboot into recovery (Command-R), check the HDD for errors (repair hard drive). If it comes back good, then I would reinstall the OS over the top of the existing OS. You won't lose anything and if something is mucked up, it could fix it.
An alternative to (2) is to redownload Mountain Lion from the MAS and then run it, select your "Macintosh HD" for the install target.
The reason I would do these two things is to have confidence that my hardware/software is good.