Hmmm. I have a silly little guy who is a rescue that went through allot of stress before I got him mostly emotional stress. He used to suck his back foot at bedtime just like a baby sucking it's thumb. Something I noticed is that he gets the Mad Dogs at bedtime as soon as I put him on the bed. I used to make him settle down and he did but then would start sucking his foot. So I put a toy and nylabone on the bed and let him play for a bit till he gets out all his energy then when he lays down and goes for his foot I put my hand over his foot and give him the nylabone. Now he falls asleep with the nylabone instead of with his foot in his mouth. Oh, and his name is Taylor

So I'm thinking it's from boredom or stress.