The procedures for cleaning your guitar’s electronics are very different from those used to clean and polish the body and neck. In fact, cleaning in regard to controls in particular, means internal cleaning, and it’s something that has to be done just right, with the right product. However, it’s still something you can very easily do yourself, usually as an easy fix for scratchy-sounding or stiff-feeling controls.
As regards the pickups and any external parts of the electronics, never treat them with any spray polish or cleaning fluid. Simply wipe them over with a clean, dry cloth and be done with it.
Fluids of any kind that leak into your pickups can short out the windings of the coil, lead to corrosion, or permanently damage them in some other way, so this should be avoided. Moisture is equally harmful to volume controls, tone controls, and switches, so keep fluids away from these at all costs. This goes double for spilled beer, water, excessive sweat, or whatever else may want to seep in there.
To clean and lubricate volume and tone controls, which are electronic components known as potentiometers (or pots for short), you need the right kind of electrical contact-cleaning and lubricating spray product, such as DeoxIT, and you also have to get to the backs of the potentiometers themselves (WD-40 is not an electrical contact cleaner and should not be used for this application).
Many guitars allow access to these components either by removing the cover to a control route on the back of the guitar (as on many Gibson- and Gretsch-style guitars), or by lifting the pickguard on guitars with pickguard-mounted controls, such as Stratocaster-style guitars.
With the latter, you usually don’t have to remove or even loosen the strings or remove the entire pickguard: Removing a few screws around the region of the controls often allows you to lift the guard enough to access the backs of the pots.
After you’ve found your way in to the controls, attach the aiming straw to the nozzle of your electrical cleaning spray and lubricant, direct it into the rectangular slot on the side of the potentiometer housing (usually adjacent to where the wiring terminals are mounted), and give a quick spray into each pot.
Then repeatedly rotate each control knob clockwise and counterclockwise several times to spread the cleaner and lubricant. In most cases, this eliminates any scratchy noise in their function and should also smooth out the feel when you turn them, too. Many types of open-case switches benefit from a squirt of cleaning fluid too, so you can hit that while you’re in there.