Toddler grinding/masterbation

I have been noticing my sweet little boy is starting to get pleasure when grinding on the ground before falling asleep. When I asked the dr about this behavior she said that all he was doing was self soothing. However his grinding behavior is getting more and more frequent and longer. We have told him to stop grinding (especially when in public areas of the house). When he is in his own room and going to bed I have no control over what he is doing. I know that. My question is if anyone else has witnessed this type of behavior in your children? Any advice?