This effect is due to the motion receptor in your eyes being continually stimulated in one direction for a period of time. When the stimulation is removed, the motion receptors still attempt to visualize the motion, even if there is no motion. Therefore inanimate objects may seem to move.