Rain-X anti-fog is an uttterly worthless product, so I would not bother applying it to your glasses; it won't work anyway. It pains me to say this, because I am a huge Rain-X fan. The anti-fog product is terrible, though, no two ways about it.
I don't know whether the conventional Rain-X can be applied to glasses. You might want to try it first on an older pair if you have one lying around.
I'd be worried about streaking; Rain-X is a fantastic product, but it does streak a little. Note that the streaking is not the same thing as the initial hazing. The initial hazing, which clouds up your windshield and upsets a lot of first-time Rain-X users, can be washed off. The subsequent streaking happens every time you use your wiper blades, and I have never found a solution for it.