What kind of bedding do you use if there are very small particles in the bedding one may have gotten lodged in his ear and may be causing discomfort.. and if it stays in there it can cause an infection and kill him being that it is so close to his brain... if he continues doing this take him to a vet... and change his litter asap!!!
when this happens it screws with his equilibrium thats why he would be turning his head to the side.