A lot of older cats get arthritis in their legs and scratching and stretching their legs is often a symptom that they're trying to relieve the pain. In this case, check with a vet. If he's just doing it from a young age, buy one of these scratching posts from a pet shop, or alternatively buy a small square offcut of carpet (sample size) which carpet shops often sell for a couple of pounds, and whenever your cat scratches somewhere, pick him up and scratch his paws on this particular piece of carpet. He may then get the message that he's allowed this one scratching place. You have to try and break this habit early. Our two cats between them wrecked two sofas, one armchair and also shredded holes in the stair carpet. (All done while we were out at work - the little perishers knew they weren't allowed to do it while we were in the house !)