My PC turned off suddenly due to blackout. When I turned it back on, the USB mouse axes were rotated 90 degrees to the right.
It's a dual boot (Windows/Linux) system, but no matter which one is booted, the same thing happens.
I tried a Windows 7 installer to see if it affected its GUI, and yes it did.
Ruling out any possible software cause, I'm completely clueless as to what caused this.