SummaryRecently, wireless sensor networks (WSNs) have been used for monitoring, sensing, processing, and communication purposes in real‐time applications. It is employed with a routing protocol that performs an effective data transmission process. However, while transmitting large data, there occurs an over fitting issue, which leads to determining a huge data leakage. Also, the delay is increased with heavy congestion in the network. Hence, a novel method is proposed to diminish the network congestion regarding distributed networks as well as cloud edge computing. Moreover, it diminished the data loss from an overloaded condition. However, the proposed technique controls congestion that resists the traffic in the network through lightweight, ultra‐dense label‐less federation and incorporates adaptive multi‐agent Markov reinforcement learning. Furthermore, a distributed energy‐efficient delay‐aware routing protocol is employed to analyze and regulate congestion control in the network. Also, it varies the network dynamically by adjusting the routing protocol that optimizes the congestion and implements the traffic mechanism. Moreover, the congestion in WSNs overwhelms the nodes and channels distributed in the packets. The evaluation of the proposed method is determined by various metrics such as queuing delay, network lifetime, energy efficiency, throughput, and packet delivery ratio. The experimental results revealed that the proposed method attained an enhanced performance by maximizing energy efficiency and packet delivery ratio by 94% as well as 89% and reducing the delay by 55%, respectively.