Catalysis of the reaction: trimethylamine + H2O + electron-transferring flavoprotein = dimethylamine + formaldehyde + reduced electron-transferring flavoprotein.
trimethylamine:electron-transferring flavoprotein oxidoreductase (demethylating)