This paper investigates the problem of resource allocation for a wireless communication network with distributed reconfigurable intelligent surfaces (RISs). In this network, multiple RISs are spatially distributed to serve wireless users and the energy efficiency of the network is maximized by dynamically controlling the on-off status of each RIS as well as optimizing the reflection coefficients matrix of the RISs. This problem is posed as a joint optimization problem of transmit beamforming and RIS control, whose goal is to maximize the energy efficiency under minimum rate constraints of the users. To solve this problem, two iterative algorithms are proposed for the single-user case and multi-user case. For the single-user case, the phase optimization problem is solved by using a successive convex approximation method, which admits a closed-form solution at each step. Moreover, the optimal RIS on-off status is obtained by using the dual method. For the multi-user case, a low-complexity greedy searching method is proposed to solve the RIS on-off optimization problem. Simulation results show that the proposed scheme achieves up to 33\% and 68\% gains in terms of the energy efficiency in both single-user and multi-user cases compared to the conventional RIS scheme and amplify-and-forward relay scheme, respectively.