1.1.1.261 sn-glycerol 1-phosphate + NAD(P)+ = glycerone phosphate + NAD(P)H + H+