Catalyzes the demethylation of N,N-dimethylglycine to sarcosine. Also has activity with sarcosine in vitro. (6S)-5,6,7,8-tetrahydrofolyl-(gamma-L-Glu)(n) + H(+) + N,N-dimethylglycine + oxidized [electron-transfer flavoprotein] = (6R)-5,10-methylenetetrahydrofolyl-(gamma-L-Glu)(n) + reduced [electron-transfer flavoprotein] + sarcosine Binds 1 FAD covalently per monomer. Amine and polyamine degradation; betaine degradation; sarcosine from betaine: step 2/2. Belongs to the GcvT family.