Following flexser's answer, I used compressed air to blow out the crud in my mouse (a Logitech Performance MX, whose mouse wheel had stopped working for the most part). I didn't even have to open up the mouse, just blew in all the holes.
Problem solved!