For some reason, the thumb trackball mice always seem to wake up my computer in the night. This would be understandable if there were pets involved, but there aren't. I disabled wake from the mouse in BIOS, but it doesn't seem to have done anything. My top search result for linux stop computer waking from sleep on mouse activity turned out to be an askubuntu page on this subject which contained a high quality answer. Here is a distillation:
cat | sudo tee /etc/udev/rules.d/90-usb-wakeup.rules
# Disable waking up from Logitech unified receiver
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", ATTR{power/wakeup}="disabled"
Then hit control-D and follow it up with:
sudo udevadm control -R
You may now have to unplug and replug the device.
Longer explanation: This example from the linked article creates a udev rule which disables wake from suspend for the specified device, in its case a common Logitech receiver. You can get a list of USB devices on your system using the lsusb command from the usbutils package. e.g.:
# lsusb
Bus 001 Device 008: ID 045e:0291 Microsoft Corp. Xbox 360 Wireless Receiver for Windows
Bus 001 Device 004: ID 320f:5000 Evision RGB Keyboard
Bus 001 Device 006: ID 056e:00fb Elecom Co., Ltd M-XT3URBK EX-G Optical TrackBall
This is not the full output, only the most relevant lines. The IDs are in vendor:product format. I blocked the 360 receiver in addition to the trackball, just in case it can generate a wakeup if the controller power button is pressed. I did not block the keyboard. Now wakeup works normally from the keyboard, but does not happen from the mouse, and the machine stays asleep all night as it is supposed to.