sounds like he is irritated. They do that also when they have ich. Watch out for possible outbreak. See if anyone else in the tank is doing the scratching thing. If they are, time to treat. If they arent and it is just him, time to quarentine him. If it is ich.