Reducing power consumption is a pivotal challenge in 5G millimeter wave (mmWave) networks due to the density of the base stations (BSs) in these networks. In this paper, we focus on the joint user and power allocation problem in 5G mmWave networks, aiming to minimize power consumption while maintaining the user Quality of Service (QoS), considering the BSs switching on/off strategy. Initially, we formulate the problem as an Integer Linear Program (ILP), aiming to obtain the optimal solution. Due to the NP-hardness of the problem, we propose a Genetic Algorithm (GA)-based heuristic strategy. Extensive simulations are conducted to evaluate the performance of the GA. The obtained results demonstrate the efficiency of the proposed GA in providing close to optimal solutions, even in scenarios with a large number of users, when compared to the ILP. Additionally, the proposed GA outperforms the benchmark algorithms in terms of network power consumption, network throughput, energy efficiency, and the number of switched off BSs. Moreover, when comparing the running time of the different methods, the proposed GA shows a significantly reduced time compared to the optimal solution obtained by the ILP method. At the same time, it requires a running time close to the running times of the benchmark solutions. Further insights from power consumption patterns in residential and office areas affirm the consistent energy savings achieved by the proposed GA, emphasizing its applicability in real-world scenarios. In our case, the proposed GA yields energy savings up to 22.34% and 33.12% in residential and office areas, respectively.