A large number of studies showed that high ground stress had a certain influence on the wave velocity of deep buried rock, based on the wave equation, a mathematical model of the relationship between longitudinal wave velocity of sandstone and hydrostatic confining pressure was proposed. Based on the conventional triaxial test of rock, the static elastic modulus, static Poisson's ratio and longitudinal wave velocity of sandstone under different hydrostatic confining pressures were obtained, and the fitting curves and fitting formulas of static elastic modulus-hydrostatic confining pressure and static Poisson's ratio-hydrostatic confining pressure were obtained respectively. The test results showed that the static elastic modulus and static Poisson's ratio of sandstone increased with the increase of hydrostatic pressure, and the rate of increase of static elastic modulus decreased slowly. Based on the wave equation, the mathematical model of the longitudinal wave velocity-hydrostatic confining pressure was obtained, the longitudinal wave velocity calculated by the mathematical model showed that the longitudinal wave velocity of the sandstone increased with the increase of the hydrostatic pressure, and the increasing rate gradually became slower. The calculated longitudinal wave velocity was compared with the measured, the error range was 7.0%-8.3%. Therefore, the mathematical model of sandstone longitudinal wave velocity-hydrostatic confining pressure based on wave equation was reliable and accurate, it was of guiding significance to analyze and judge the physical and mechanical parameters of rock under high ground stress and the variation law of wave velocity.