Catalysis of the reactions: dimethyl sulfoxide + H+ + NADH + O2 = dimethyl sulfone + H2O + NAD+ and dimethyl sulfide + H+ + NADH + O2 = dimethyl sulfoxide + H2O + NAD+.
assimilatory dimethylsulfide S-monooxygenase activity