Removes the phosphate from trehalose 6-phosphate to produce free trehalose. Trehalose accumulation in plant may improve abiotic stress tolerance (By similarity). alpha,alpha-trehalose 6-phosphate + H2O = alpha,alpha-trehalose + phosphate Glycan biosynthesis; trehalose biosynthesis. Belongs to the trehalose phosphatase family.