I could be wrong, but it seems like an optical mouse is erratic on a pebbly, shiny surface.
Sanding the surface seems to help.
In my experience, the pebbly surface was the top of a cheap desk. Composed of particle board (also known as medium-density fiberboard i.e. sawdust with a binder) with a plastic covering made to look like wood grain.
As far as I know, an optical mouse works by bouncing a laser off the surface. It makes sense that as the laser scans hills of the pebbles, it has different angles of reflection as it hits the front side of a pebble, then the back side of a pebble. Unstable oscillation in the fugoid mode (thats a joke, but something you can look up.)