He's been spotted on the court now doing this.
Many players need the equivalent of the pacifier to manage their nerves. Some bounce the ball thirty times before serving, and others straighten their strings. My favorite was Bartoli doing shadow strokes between points. In this case, if it steadies his emotional swings, it may work for him though I generally recommend staying away from oral fixations on the court since you can easily choke. I hope Toothpick Nick finds it works for him.