Fiddlemom, does your son have any tics or tic-like behaviors? Common early ones are eye-blinking, throat clearing, sniffing, curling or thrusting the tongue repeatedly, pulling in the abdominal muscles, making little noises with his tongue (kind of like 'tsk'), or low, gutteral noises (these can be very quiet). If it's a tic, it will be repeated a lot for a certain period--usually between 4 and 10 weeks--and then it will stop. It may come back a month or two later, though. Tics are very common, and lick-biting can be one (though somewhat unusual as an "only" tic--it would usually be one of a few) and moreso in people with a family history or tics or OCD. My son has Tourette's Syndrome, but having a few tics does not = TS (about 10 % of children have tics during childhood, but about 1 in 200 or fewer have TS).
I may be offbase on the suggestion of tics, but the fact that he wants to stop and can't does sound potentially tic-like (and the fact that it just seemed to stop at one point is very tic-like). It it is a tic, the approach is basically to wait it out and do what you can to see that the child isn't scolded, punished, or shamed for tic behavior. With problematic tics, redirection such as you tried (like chewing gum, prayer) is helpful. Since tics can be associated with OCD, I would be careful to not foster the thought that "If I pray right it will stop, so if I pray and it doesn't stop, then I must not be praying right". That kind of thinking can get out of control in kids with these tendencies.