I would not spray contact cleaner into a potentiometer by itself. Contact cleaner will do a good of cleaning inside the pot, but it also does a good job of removing any lubricant, both on the resistive trace and, more importantly, on the shaft bearing.
I would use DeoxIt because it contains a lubricant, along with the cleaning chemicals. The application is the same: spray it inside the housing so that it reaches the wiper and trace. Then rotate the control full ranged many times (more than 10). Depending upon the condition of the pot, it may require several applications of DeoxIt D5. My preference is to use
DeoxIT Faderlube, which contains a bit more lubricant and is intended for use on faders (pots).