There's a terminal command to find out what is happening while it's going to sleep. I can't remember what it is off the top of my head, but I'll edit this post later if I remember it.
Edit:
I found it. Paste:
pmset -g log
into the terminal and check the response times on everything listed. Anything under a thousand or two ms shouldn't be causing the problem.
Ok I tried this, and starting looking when the issue started which was yesterday.
This came up alot of the time:
* Domain: applicationresponse.timedout
- Message: Kernel cupsd com.apple.powermanagement.applicationresponse.timedout 30000 ms
- Time: 1/23/11 2:56:31 PM EST
- Signature: cupsd
- UUID: 79B7820A-C020-4FE6-B00C-D04B298BA45C
- Result: Noop
- Response time (ms): 30000
This came up a couple times as well:
* Domain: sleep
- Message: Sleep: Apps Failure - AC
- Time: 1/23/11 3:15:12 PM EST
- Signature: Apps Failure
- UUID: C4DA5603-D690-4697-A02C-A2ABEE4A905D
- Result: Failure
And this: * Domain: applicationresponse.slowresponse
- Message: PMConnection AirPort configd plug-in com.apple.powermanagement.applicationresponse.slowresponse 222 ms
- Time: 1/23/11 3:16:40 PM EST
- Signature: AirPort configd plug-in
- UUID: F1444713-8D7D-4023-8348-98165950B307
- Result: Noop
- Response time (ms): 222
Then the few times it went off quickly it had this:
* Domain: sleep
- Message: Sleep: Success - AC - Software Sleep
- Time: 1/23/11 5:45:50 PM EST
- Signature: Success
- UUID: 093C44D3-A0BE-40E8-838B-8FC72C148F07
- Result: Success
Don't know what any of that means, but from reading some of those words, it does look like theres a problem. The ms in some of the numbers today was all over the place, sometimes it said 5000, others under 1000.
- Sleep count : 6