A novel technique is proposed to optimize energy efficiency for wireless networks based on hierarchical mobile clustering. The new bi-level clustering technique minimizes mutual interference and energy consumption in large-scale tracking systems used in large public gatherings such as festivals and sports events. This technique tracks random movements of a large number people in a bounded area by using a combination of smart-phone Bluetooth and Wi-Fi connections. It can be effectively used for monitoring health conditions of crowd members and providing their locations and movement directions. An integer linear programming (ILP) model of the problem is formulated to optimize the formation of clusters in a two-level hierarchical structure. In order to evaluate the proposed technique, it is compared to the optimum solutions obtained from the ILP model for both single-level and two-level clustering. Moreover, a Matlab/Simulink simulation model is developed and used to test the technique performance under realistic operating conditions. The results demonstrate a very good performance of the proposed technique.