Abstract: Contributing to both energy-deficiency alleviation and carbon footprint reduction, energy harvesting (EH) and sleep mode (SM) are deemed to be promising techniques these days. Different from existing researches, this paper considers uplink multi-user relay systems which adopt these two kinds of technologies. The relay in our system is an EH node with random charging rate while the base station (BS) is supplied by power grid and users work with traditional rechargeable batteries. We propose a novel power allocation scheme with which the system can minimize the total energy consumption. After formulating a joint optimization problem, we put forward a heuristic algorithm and successfully decrease the computational complexity. Firstly, by fixing the transmission time, we transform the problem into a convex optimization problem. Secondly, the shortest transmission time can be obtained by the method of bisection. The simulation results show that the proposed scheme can effectively bring a lower energy consumption, and we further validate that a combination of EH and SM plays a significant role in energy saving.