
This is believed to be related either to stress or boredom. The licking releases calming endorphins but also the friction hair and can cause very nasty wounds. Once there is discomfort, the dog will try to soothe it by licking - and the wound gets worse. It's a vicious circle.
Has your household routine changed at all recently, which has upset him? Is he left alone for long periods?
You may find
this article helpful.