I used to sell a competing product for commerical applications, so I know a little about this.
Rain-X is a silicon product that will not harm your mask glass or rubber. In a nutshell, on a car, Rain-X forces the water form drops by increasing the surfacing tension of the water. Once these drops (or bubbles as they almost become) become large enough, the wind catches them and blows/rolls them off your windshield.
This will not work in an anti-fog application because not enough water vapor is present in the mask to make the drops form and there is no wind to blow it off the mask. In fact this will be counter-productive as it will make any condensation form tiny beads which is what makes the mask "fog" and distorts your vision.
What you actually want is a product that does the opposite and decreases, or breaks, the surface tension of the water so that it sheets in a flat surface across the entire mask. This way you get clear vision.
As an analogy, you get great vision through your clear, flat glass pane in your mask. However, think of privacy glass in a front door or a house or shower enclosure. This glass is ridged or molded in a decorative way so that the surface is not flat. The dimpled surface causes the light to refract so that you cannot see through it well. Rain-X would, in effect, create these dimples.
My recommendation, stick with spit, or any readily available anti-fog.
Don