Toothpaste (non-abrasive) definitely works on a SCUBA mask. Used it hundreds of times.
I've tried using toothpaste on a set of cheapo MEC glasses. It worked ok, but the effects quickly wore off. Once you work up a sweat, they still fogged up when stopped for any period of time. I now use Rudy Project Equinox Glasses/Goggles. This was a big improvement... combination of great visibility and peripheral vision from glasses with the double lense and insulation of goggles. So far, I haven't had problems with fogging (with the exception of balaclava-blast)... -30 - +30 deg C.