Here is an idea to consider . . .
My 4.5 year old daughter started doing this several months ago, usually during times of idleness like when watching TV or trying to go to sleep. I usually just told her to take her hands out of he mouth when I saw it happening, and I've been adamant about her washing her hands very well (with a nail brush, too) after she uses the toilet or if I see her touching her private areas (yea, she was doing that around the same time, too.)
My homeopath suggested that she probably had pinworms . . . hands in the mouth are a symptom of that, as is excessive fondling or scratching in the vaginal and anal areas. We have a dog and my daughter spends a lot of time around other kids, too. The homeopath said that these are places where kids can pick up the worms. They are actually fairly common, most parents don't ever realize that their kids have them. You could do your own examination to find out if you son has them . . . just send me a message and I can tell you how. Or you can search online for the info.
There are OTC remedies at the drugstore or online for pinworms and there is a homeopathic remedy as well that I can tell you about (I don't sell it.) If you need any further info, just let me know. If you treat your son for pinworms, you'll have to treat everyone in the household, as well.