This paper investigates the joint power allocation problem for a three-node massive MIMO relaying system with maximum ratio combining/maximum ratio transmission (MRC/MRT) precoding strategy. Our goal is to pursuit the energy efficiency (EE) maximization while taking a quality-of-service (QoS) requirement into account by optimizing the source-relay transmit power simultaneously. To handle the EE based problem, we first derive a closed-form expression of the involved spectral efficiency (SE) by leveraging the tools of determinate equivalent approximation technique. Then, the optimal power solutions at the source and the relay are deduced in analytical forms by exploring the Lagrangian dual technology and the Lambert W function. What's more, one can find that the optimal power values at the relay and the source satisfy a specific ratio, which is determined by the system parameters and the large-scale fading factors of the two-hop channels. Numerical results illustrate the performance advantages of our developed power allocation method.