This BCA rule covers it:
3.31 BALLS MOVING SPONTANEOUSLY
If a ball shifts, settles, turns or otherwise moves “by itself,” the ball shall remain in the position it assumed and play continues. A hanging ball that falls into a pocket “by itself” after being motionless for 5 seconds or longer...