Why does my mouse invert itself?

This seems to happen more often when the game is not running at full speed, and is because the game lets you look past the Z (up) axis and right around behind you. To return the mouse to normal, keep looking up (or down) until you can't any more.