Try this workaround - instead of tapping a key to wake your iMac, tap the power button on the rear case instead. That action causes a different "wake from sleep" event to occur. It may work for you.
This was a common problem that the last incremental OS X update was supposed to have solved. It did for most people, but for others it remains.
Current airport support on this site is for OS X 10.6, but I am already on OS X 10.8.3. Why Apple Support doesn't use updated system?
A good question for which I only have a cynical answer, and I'm trying to avoid that. This is the most recent article: Troubleshooting Wi-Fi issues in OS X Lion and Mac OS X v10.6
Its recommendations remain unchanged for Mountain Lion, but won't help resolve this problem anyway.
You're caught in the vortex that MANY mac users have experienced. I have gone through all the suggestions listed in the forums, spent the money (and wasted time) going through Apple support, and was about to change my linksys router (which works perfectly with every other wireless device in my household). Then I tried buying a wireless ethernet adapter, hooked it up, connected to router through that device instead of built in airport and VOILA! Problem solved! Haven't had one disconnect or restart since I did this 3 weeks ago. Ive logged dozens of hours on internet since then, gone through numerous sleep cycles on the computer and no problem. The issue seems to be a combination of the airport adapter hardware and the software upgrades that occurred 2 years ago. There seems to be no fix to it once you start experiencing it.
Please try my suggestion, shell out the extra bucks and begin enjoying using your mac again!
Thanks for suggestion. But I think this is just happen for the OS X 10.8. version. It was fine before. And now, not only my iMac does this, my Macbook Air does the same. It's all because of OS X 10.8.
Apple should fix it!
I don't understand why Apply isn't aware of it and to fix it! Also on this Apply support, they are still having OS X 10.6 instead of 10.8. This is really BAD!
I can't believe Apply does not update their support as they shoud! It's very disappointing!