My german shepherd, Mayhem, does this. I honestly think she does it out of boredom. The other dogs will be asleep, she'll get bored with her toys and then just lay down and bite at her nails. Drives me nuts when she does it at night. Our vet thinks it's a boredom thing also with her.