This will sound daft, but it happened to me! My optical mouse took to jumping around the screen in a semi-random, jerky fashion. On checking I found a hair had lodged itself across the lens aperture, and as I moved the mouse, it would initially remain in place, so the pointer would start out normally, then it would spring across to the other side, at which time the pointer would suddenly jump to a different place on the screen.
It gave the spooky effect that someone else was fighting me for control of the mouse.