Have you ever woke up in the middle of the night by some gnawing noises?
Your dog must be chewing on something really tough and nice: His nails.
He is probably chewing due to:
1. Skin allergy or infection
Fido might be having a skin allergy that is causing irritation at his paws and causing him to bite at it.
2. Overly long nails
Especially so for dew claws (the additional toe at the inner side of their feet). When the nails get really long, they curl up and irritate the skin around it. Fido could be biting at it as an attempt to shorten his nail.
3. Boredom or habit
When doggies have prolonged “nothing-to-do” periods and when there are no other entertainments such as toys or treats, they are left with chewing nails as it is fun and smells good! (Did you know dogs love the smell of their paws? If you have yet to try smelling it you should try it right away ;)) Over time and especially for puppies, it easily becomes a habit and they take this habit with them as they grow up. Then, it may take more effort to stop the behaviour.
My advice will be to get Fido cleared by the vet of any skin allergies and focus on providing him a fulfilling lifestyle with adequate exercise and interactive toys to keep him free of any pent-up energy.