Since upgrading to Mac OS Lion I have been unable to persuade our ageing MacBook to go to sleep when it’s supposed to. The OS X Energy Saver preferences were set correctly, but it would not sleep of its own accord. Putting it to sleep manually worked, but the computer sleep idle timer was just ignored.
I put this down to a quirk of the older hardware and worked around it by defining a nightly sleep schedule, but when our shiny new iMac did exactly the same I knew there must be an application overriding the default behaviour.
Sure enough after a morning of trial and error and eliminating all the other options, I finally discovered the culprit to be Dropbox LAN sync.
If Dropbox LAN sync is enabled then the Mac won’t put itself to sleep. The mystery is finally solved!
If you’ve disabled Dropbox LAN sync and your Mac is still powering on periodically (like every hour), then make sure you have also unchecked ‘Wake for network access’ in the Energy Saver preferences.
(Note: Mac OS X 10.7.3 & Dropbox client v1.2.52)