This sounds like it may very well be a hardware problem, you should try swapping out both the mouse and keyboard and then monitor to see if it happens again. I suspect the USB cable on the mouse may have damage as I have seen this in the past with keyboard tray rails slicing the cable.

Also try using different USB ports, if you are using a USB Hub try plugging the devices directly into the computer.