I'm still in the same position but here's an update. I have a
late 2012 iMac and it was running 10.8 when I got it so it's not a Mavericks thing. I'm now in my third week of discussions with AppleCare and my second Senior Advisor. I've been putting this off for way too long so I decided to finally call them up and get it sorted. They've had me try safe mode, no external devices (which I never had anyway), numerous permissions changes, etc. The permissions changes that he made me do essentially crippled the machine. I tried reverting everything and I couldn't get it back to perfect. For the sake of argument, I'm a web developer and work all day on the command line so it's not that I was completely lost with this stuff. He recommended repairing permissions in Disk Utility (which I'd already tried). I tried it on the phone and it took about 20 minutes after the changes he made me do (compared to < 1 minute when I'd done it myself previously). He said that would sort it but I opened Disk Utility again and all the issues were still there. This was far from a solution and it didn't make any difference to the waking issue anyway. I ended up formatting (again!) the other day and setting up a fresh 10.9.2. The problem is still happening and AppleCare received my second set of logs that I created using their data capture tool. It was last Thursday (9 days ago now!) when they got them and I was told that because they'd already seen them the day before they'd only need 24 hours. I didn't hear anything and on Monday, after me emailing my advisor, he said he'd definitely have a resolution for me on Tuesday. I didn't hear anything until another advisor called me yesterday saying that the other guy wasn't in and that he was taking the case. He's hoping to get back to me today (Saturday) but I'm not holding my breath. Supposedly, the Engineering team are taking longer than expected. It's Saturday now and on Monday the original advisor said he was going to them directly to get the case expedited. Hmm, I guess that didn't do anything (if he even went at all).
As I mentioned, I formatted again the other day and the problem is still there. I don't have any external devices, scheduled Time Machine backup, scheduled wake time, etc. The only applications open when the iMac went to sleep the other night were Mail, Safari, and Fantastical in the menu bar. Here's one of the most recent
incidents. At ~0400 the screen came on (as it does almost every single night) and stayed on for a while. It eventually went off but I could still hear the fan. This is what happens most nights so at this point I was expecting it to go to sleep again and not bother me. A minute or so later the fan cranked itself up to full speed. It was the middle of the night and it sounded like a plane had landed in my bedroom! It stayed on for a minute then stopped. Honestly, in a year of owning this iMac I've never heard the fan like that, not even close. I checked the logs in the morning and there wasn't anything that stood out (I'm talking really high-level, I obviously don't know what most of it is) and there were definitely no applications causing it (Safari had no tabs open, just the application itself). I've been having this issue for a very long time now. It might have been there from the first day I had the iMac but it's hard to say because for the first couple of months it was in another room. The day I moved it to my bedroom was the day I started noticing it. My girlfriend has even told me numerous times that it's "made noise" (i.e. woken up, screen on, etc.) during the day when I've been out then just gone back to sleep again. She thought this was probably normal but once I told her that it wasn't she pointed out that a 3000 computer should at least be able to sleep when you tell it to!
Anyway, you're not alone here. My iMac is almost exactly 1 year old now and I have the extended AppleCare. What do you guys think I should do? I've tried everything they say, submitted logs on request, and generally been very polite with it all. That said, when do I say enough is enough and demand a proper fix? One of the recent advisors made me change lots of deep permissions, as previously mentioned, and add new users in hope of this fixing it. I told him that even if the issue went away that it's not an acceptable solution as there's no way it's normal to have to make lots of changes like that on a fresh install. The advisors have called numerous times with "I think I know what it is!" and the setting they've expected me to have changed is still default and then it's back to the drawing board for them. I have two other Macs in my apartment and I've tested them both using the same iCloud accounts and running the exact same software. Neither of them wake up in the night. Never.
To add some more context, I've tried with Wi-Fi (that's my default), with Ethernet, with no connection at all, with USB devices, without USB devices, etc. The problem doesn't seem to have a pattern.
Good luck with your situation. I'll update when I hear more on my side.