I would believe it's a way of calming and soothing himself/herself.Repetitive behaviors are thought to help toddlers release tension and extra energy, and act as a calming influence. Toddlers often do these behaviors when they are still full of energy but need to wind down and fall asleep (i.e. before naps and at bedtime). They may also engage in these behaviors during a developmental transition (like potty training) or during a season of transition or stress (like during a move, or during the birth of a new sibling).
How old is your LO? Normally when young babies acquire a new set of skills, they will tend to repeat it for many times. For e.g. my child realize he can actually put his toys into the box and make it disappear (when he was about 1.5 years old). He repeated this over and over again for few days.
I believe your LO just 'found out' and enjoys repeating this. Our son has done a lot of things repetitively once he discovered it. This goes away as soon as they discover something new :)