This study aimed to explore the role of the trehalose-6-phosphate synthase (TPS) gene family in the adaptation of peas to environmental stress. A comprehensive analysis of the PsTPS gene family identified 20 genes with conserved domains and specific chromosomal locations. Phylogenetic analysis delineated evolutionary relationships, while gene structure analysis revealed compositional insights, and motif analysis provided functional insights. Cis-regulatory element identification predicted gene regulation patterns. Tissue-specific and stress-induced expression profiling highlighted eight genes with ubiquitous expression, with PsTPS15 and PsTPS18 displaying elevated expression levels in roots, nodules, and young stems, and PsTPS13 and PsTPS19 expression downregulated in seeds. Transcriptome analysis identified a differential expression of 20 PsTPS genes, highlighting the significance of 14 genes in response to drought and salinity stress. Notably, under drought conditions, the expression of PsTPS4 and PsTPS6 was initially upregulated and then downregulated, whereas that of PsTPS15 and PsTPS19 was downregulated. Salinity stress notably altered the expression of PsTPS4, PsTPS6, and PsTPS19. Taken together, these findings elucidate the regulatory mechanisms of the PsTPS gene family and their potential as genetic targets for enhancing crop stress tolerance.