Cats scratch for a reason. If your cat is scratching your box spring, it is probably doing so for one of two reasons. Either it wants to leave its scent, which comes from the sweat glands located on its paws, or it wants to sharpen its claws. Giving your cat an approved way to do these two things will help keep it from scratching your box spring.
Buy a scratching post made of materials your cat likes to scratch and put it near the box spring. Move it a little further away each day until it is in a more suitable location.
Add a bed skirt to your bed to cover up the box spring and make it less attractive to your cat. Taping cardboard to the bottom of your box spring can help if your cat scratches the bottom of your box spring.
Place double-sided tape in places where your cat likes to scratch if you don't want to use a bed skirt. Most cats do not like sticky surfaces against their paws, so this discourages scratching.
Get rid of the cat's scent with an enzyme cleaner. Spray citronella spray on your box spring to cover up any lingering scent. Removing the scent discourages the cat from returning to the box spring, and cats typically do not like the smell of citronella.