My 4 year old daughter has been doing this off and on. She has had little nervous habits for a couple years, so this isn't entirely surprising to me. (She's twirled her hair into knots, she chews on her hair sometimes, and she bites her nails.) It drives me crazy, and I odn't really know why she picked up the habit. There was one point when she was even chewing her toenails and ripped one halfway off. For her, telling her I wouldn't paint her nails until she stopped worked. Though she has started again because I never paint her nails... But for boys, that probably won't work. I hesitate to put anything gorss tasting on her nails because I don't want that to affect her eating habits, and she's got two younger siblings and I don't want something rubbing off onto toys. I have a "chore chart" for my kids that helps me to control their undesirable behaviors. Since they're little, their "chores" are things like picking up toys, not fighting, and listening to their father and me. You could start a chart and make not biting nails one of the "chores". My kids have 5 things to do each day and get a sticker if they have been good. They get to miss up to two "chores" and can still get their sticker, and can miss up to two days' stickers and they still get their weekly prize. They love the chart and it really does help curb the less desirable behaviors.