This seems to be very much Bluetooth-related.
When the error occurs (and it isn't every time), all the BT HID's I have (keyboard, mouse, trackpad) reconnect - they are unresponsive, and the green light on the keyboard and trackpad come on before they are responsive again.
If there are any Apple techs reading, here's some example output of dmesg following a wake where the error occurs:
Wake reason: EHC1
AirPort_Brcm43xx::powerChange: System Wake - Full Wake/ Dark Wake / Maintenance wake
Previous Sleep Cause: 5
Previous Shutdown Cause: 0
USB (EHCI):Port 1 on bus 0x1a connected or disconnected: portSC(0x3002)
USB (EHCI):Port 1 on bus 0x1d connected or disconnected: portSC(0x3002)
wlEvent: en1 en1 Link DOWN virtIf = 0
AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
en1::IO80211Interface::postMessage bssid changed
TBT W (2): 0x0100 [x]
[0xffffff8044e98600](0)/(5) Device not responding
**** [IOBluetoothHostControllerUSBTransport][SuspendDevice] -- Resume -- Error -- GetDeviceInformation() returned 0xE000404B (kIOUSBHighSpeedSplitError) ****
**** [IOBluetoothHostControllerUSBTransport][StartInterruptPipeRead] -- mInt0InterruptPipe->ClearPipeStall() failed with error 0xE000404B (kIOUSBHighSpeedSplitError) -- this = 0xffffff80453dbc00 ****
**** [IOBluetoothHostControllerUSBTransport][StartBulkPipeRead] -- mInt0BulkInPipe->ClearPipeStall() failed with error 0xE000404B (kIOUSBHighSpeedSplitError) -- this = 0xffffff80453dbc00 ****
**** [BroadcomBluetoothHostControllerUSBTransport][StartLMPLoggingBulkPipeRead] -- ERROR -- ClearPipeStall (TRUE) failed with error 0xE000404B (kIOUSBHighSpeedSplitError) -- this = 0xffffff80453dbc00
**** [IOBluetoothHostControllerUSBTransport][DeviceRequestCompleteHandler] -- Received 0xE000404B (kIOUSBHighSpeedSplitError) -- target = 0xffffff80453dbc00 ****
USBMSC Identifier (non-unique): K4CCAH31423 0x5ac 0x1500 0x202, 2
[[0xffffff8045804000] OpCode 0x0C3F (Set AFH Host Channel Classification) from: blued (94) Synchronous status: 0x00 (kIOReturnSuccess) state: 2 (BUSY) timeout: 4321] Bluetooth warning: An HCI Req timeout occurred.
**** [IOBluetoothHostControllerUSBTransport][DeviceRequestCompleteHandler] -- Received 0xE000404B (kIOUSBHighSpeedSplitError) -- target = 0xffffff80453dbc00 ****
MacAuthEvent en1 Auth result for: 10:9a:dd:88:be:9a MAC AUTH succeeded
wlEvent: en1 en1 Link UP virtIf = 0
AirPort: Link Up on en1
en1: BSSID changed to 10:9a:dd:88:be:9a
en1::IO80211Interface::postMessage bssid changed
AirPort: RSN handshake complete on en1
**** [BroadcomBluetoothHostControllerUSBTransport][LMPLoggingBulkOutWriteCompleteHan dler] -- Received 0xe00002eb (kIOReturnAborted); inBufferSizeRemaining = 0x00000002; isInactive = FALSE, suspended = FALSE -- inTarget = 0xffffff80453dbc00
en1: BSSID changed to 10:9a:dd:88:be:9a
[AppleMultitouchDevice::willTerminate] entered
[AppleMultitouchDevice::willTerminate] entered
[AppleMultitouchDevice::stop] entered
[AppleMultitouchDevice::stop] entered
[0xffffff8065d79700][free]()
[0xffffff8065019200][free]()
[0xffffff804a0bb400][free]()
IOBluetoothUSBDFU::probe
IOBluetoothUSBDFU::probe ProductID - 0x828B FirmwareVersion - 0x0066
**** [BroadcomBluetoothHostControllerUSBTransport][start] -- Completed -- this = 0xffffff805118e000 ****
[IOBluetoothHCIController][staticBluetoothHCIControllerTransportShowsUp] -- Received Bluetooth Controller register service notification -- controller = 0xffffff805118e000
[IOBluetoothHCIController::setConfigState] calling registerService
[BNBMouseDevice::init][75.19] init is complete
[BNBMouseDevice::handleStart][75.19] returning 1
[AppleMultitouchHIDEventDriver::start] entered
[AppleMultitouchDevice::start] entered
[BNBTrackpadDevice::init][75.19] init is complete
[BNBTrackpadDevice::handleStart][75.19] returning 1
[AppleMultitouchHIDEventDriver::start] entered
[AppleMultitouchDevice::start] entered
If I get time, I'll try switching out the Bluetooth stack with the one from 10.8.4 to see if that fixes the issue. I have a feeling it might.