Most cats do that, my Monty certainly does. There are various theories but i think it mainly takes place during periods of happiness and contentment. But in the case of a kitten......
"Kittens must nurse their mother to get life-sustaining milk. Kneading mom's teats stimulates the let-down response and causes the milk to flow more freely. The movements are instinctive, and since they incur a reward, kitty naturally transfers the behavior to other places and things in the hope of more good things to come".