Wipe mud off with a rag, paint with mineral spirits.
For mud: just wipe it dry with a rag. If it’s caked on, knock it off with a gloved hand or a dry brush. No need to involve water or cleaner.
For paint: use mineral spirits or isopropyl alcohol on a rag. Those evaporate fast and won’t hurt standard rubber or vinyl insulation. Don’t use acetone, lacquer thinner, or anything labeled “strong” — it can soften or crack the jacket. And keep it off the prongs.
Test a small hidden spot first if you’re nervous. But honestly, most consumer extension cords handle solvents fine as long as you don’t soak them or scrub with a wire brush.
Oil-based paint? Mineral spirits. Water-based? Soapy rag. Just don’t let the solvent sit on there for minutes — wipe and go.
You’re mostly trying to keep the cord flexible and crack-free. Paint cleaner is not worth buying if mineral spirits is already in the garage.