DD has been doing this for months. I mostly try to distract her with a toy, look out the window, sing a song, etc. When I would tell her to stop she would think it was funny and keep doing it then giggle. The Dr looked at her teeth last vist and said she looks fine and said that some kids just do that but should grow out of it.
Mine did this too for a while and I HATED the sound it made. Dr said it wasn't a big deal and eventually he stopped. It may be just that they are exploring this new feeling in their mouth of having teeth and they outgrow it. When it was happening, I would sort of tap his cheeks and say no no no. It didn't help.
Re: teeth grinding