Low earth orbit (LEO) satellites with wide coverage can carry the mobile edge computing (MEC) servers with powerful computing capabilities to form the LEO satellite edge computing system, providing computing services for the global ground users. In this paper, the computation offloading problem and resource allocation problem are formulated as a mixed integer nonlinear program (MINLP) problem. This paper proposes a computation offloading algorithm based on deep deterministic policy gradient (DDPG) to obtain the user offloading decisions and user uplink transmission power. This paper uses the convex optimization algorithm based on Lagrange multiplier method to obtain the optimal MEC server resource allocation scheme. In addition, the expression of suboptimal user local CPU cycles is derived by relaxation method. Simulation results show that the proposed algorithm can achieve excellent convergence effect, and the proposed algorithm significantly reduces the system utility values at considerable time cost compared with other algorithms.