In wireless sensor networks (WSNs), sensor nodes are constrained by resource constraints. The limited energy supply and susceptibility to failure greatly affect WSN lifespan, hindering long-term deployment. ENIAO is an Integrated cross-layer Optimized Routing Approach for WSNs that is fault-tolerant and energy-efficient. A bio-inspired clustering architecture and adaptive duty cycling are incorporated into ENIAO's routing optimization. In a clustering protocol, the network is partitioned, and paths are dynamically optimized within and between clusters. By optimizing active/sleep schedules, duty cycling optimizes energy efficiency. A variety of network conditions have been simulated to assess ENIAO's performance. Regarding fault tolerance and energy consumption, ENIAO significantly prolongs the network lifetime. As compared to benchmark protocols, it achieves higher throughput. As a result of the cross-layer design, ENIAO is automatically adapted to optimize energy usage and routing reliability. In the long run, large-scale IoT deployments are possible with ENIAO due to the integrated approach.