This paper investigates a Reconfigurable Intelligent Surface (RIS)-assisted multi-UAV data collection system, in which unmanned aerial vehicles (UAVs) collect data from Internet of Things (IoT) devices. The RIS, mounted on building surfaces, plays a vital role in preventing obstruction and improving the communication quality of the IoT-UAV transmission link. Our aim is to minimize the energy consumption of this system, including the transmission energy consumption of IoT devices and the hovering energy consumption of UAVs, by optimizing the deployment of UAVs and the phase shifts of RIS. To achieve this goal, a multi-UAV deployment and phase shift of RIS optimization algorithm (MUDPRA) is proposed that consists of two phases. In the first phase, a joint differential evolution (DE) algorithm with a two-layer structure featuring a variable population size, namely DEC-ADDE, is proposed to optimize the UAV deployment. Specifically, each UAV’s location is encoded as an individual, with the whole UAV deployment is considered as the population in DEC-ADDE. Thus, a differential evolution clustering (DEC) algorithm is employed initially to initialize the population, which allows for obtaining better initial UAV deployment without the need for a predefined number of UAVs. Subsequently, an adaptive and dynamic DE algorithm (ADDE) is employed to produce offspring population to further optimize UAV deployment. Finally, an adaptive updating strategy is adopted to adjust the population size to optimize the number of UAVs. In the second phase, a low-complexity method is proposed to optimize the phase shift of RIS with the aim of enhancing the IoT-UAV data transmission rate. Experimental results conducted on eight instances involving IoT devices ranging from 60 to 200 demonstrate the effectiveness of MUDPRA in minimizing energy consumption of this system compared to six alternative algorithms and three benchmark systems.