Your son sounds perfectly normal to me. I was a preschool teacher for ten years, an assistant director for a Kindercare
Learning center, and have been a parent now for almost ninteen years (three teen-agers- two sons, one daughter).
Children this age, and especially boys, discover that touching certain parts of their bodies can feel good. Babies often rub their heads when sleepy because it is soothing.
Some kids play with their earlobes, twirl their hair or run their fingers through it, hold soft blankets against their cheeks, etc... Your child has just recently discovered that playing with himself can be pleasurable as well, so he doesn't necessarily have to be "getting this" from anywhere. When my own boys were young, we simply told them that the handling of private areas is done in private. To help them understand what private means, role play certain scenes.
"When Grandma is over to visit and you are in the family romm with her, is that "in private?" "When you take youself to the bathroom, is that "in private?" Make sure he understands that when his sister is around, that is NOT "in private". Sometimes young children will invite other children to play their "game", which is still normal, but not something I would ever encourage youngsters to do.
Just be sure he is clear on the "rules" you set and this phase will pass. If you feel his behavior is excessive, then don't hesitate to talk to your pediatrician.