Rocking back and forth when sitting

Does anyone else’s babies sometimes rock back and forth while sitting? This is a new thing my 7 1/2 month old started to do and it seems to happen when he’s happy or upset mostly.