Identifying ideal thermoelectric materials presents a formidable challenge due to the intricate coupling relationship between thermal conductivity and power factor. Here, based on first-principles calculations, along with self-consistent phonon theory and the Boltzmann transport equation, we theoretically investigate the thermoelectric properties of alkali metal phosphides M3P (M = Na and K). The evident 'avoided crossing' phenomenon indicates the phonon glass behavior of M3P (M = Na and K). Due to the strong lattice anharmonicity induced by alkali metal elements, accounting for quartic anharmonic corrections, the lattice thermal conductivities of Na3P and K3P at room temperature are merely 0.25 and 0.12 W m-1 K-1, respectively. Furthermore, the high degeneracy and 'pudding-mold-type' band structure lead to high p-type PF in M3P (M = Na and K). At 300 K, the p-type power factors (PF) of Na3P and K3P can reach 3.90 and 0.80 mW mK-2, respectively. The combination of ultralow κL and high PF leads to excellent thermoelectric figure of merit (ZT) values of 1.70 (3.38) and 1.18 (2.13) for p-type Na3P and K3P under optimal doping concentration at 300 K (500 K), respectively, surpassing traditional thermoelectric materials. These findings demonstrate that M3P (M = Na and K) exhibits behavior similar to phonon-glass electron crystals, thereby indicating a direction for the search for high-performance thermoelectric materials.