bigpinkdragon286 :
You can run powercfg /lastwake at a command prompt to see what last woke the machine. Not all sources are always identified in good detail.
You can also run powercfg /devicequery wake_armed to see which devices are capable of waking the computer from sleep. If you see any mice listed, you should consider turning off their ability to wake the machine through Device Manager so errant signals from the optical sensor don't wake the machine.
You mention Razer drivers, which makes me wonder if you have one of their mice which was reinstalled as a function of updating the drivers into Windows device list and had it's power management settings reset, but it's just a thought.
I ran both of those, but for some reason today it isn't waking itself so I just ran it to see what it said after using both the mouse and keyboard to wake the computer, it gave the same message for both, not clearly identifying the source but giving the same USB instance path for both, probably because they'e plugged into the same panel. For the device query it lists the mouse and keyboard both twice and also "HID Keyboard Device" twice. I disabled my mouse from being able to wake the computer in device management under both the Keyboard and Mice categories and that took it off the device query, so now I guess I'll just see if it does this any more another time.
I'm running Windows 8.1, I haven't removed Razer Synapse but I have disabled it in Task Manager and that didn't do anything, so I sort of ruled that out. If it keeps doing this after I now disabled my mouse from waking it, I'll try uninstalling Synapse.