Ouch! I this seems to be quite a general problem, especially those running ML, and with all the latest updates installed according to many discussions.
Even using Caffeine (
Lighthead - Caffeine) doesn't seem to help many.
The general fix that seems to have fixed the problem for many was to:
• delete /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
• reboot
• If it won't solve it, another helpful step could be resetting the SMC:
Intel-based Macs: Resetting the System Management Controller (SMC)
I would have suggested the same as monokitty's suggestion and would have thought it should work, but it seems that for many who have tried changing the 'sleep' time to x hours or never, their Macs still go to sleep without any human input, and many within just 10 minutes.
Both with large downloads and sometimes iTunes and video stuff.