Fog computing is becoming a dynamic and sought-after computing prototype for Internet of Things (IoT) application deployments. It works in conjunction with the cloud computing environment. Load balancing, which is employed by IoT applications when deciding, which fog or cloud computing nodes to use, is one of the most critical components for enhancing resource efficiency and avoiding problems like overloading or underloading. However, for IoT applications, ensuring that all CPU nodes are evenly distributed in terms of latency and energy utilization remains a challenge. To solve these issues, this work introduces Differential Grey Wolf (DGW) load balancing with stochastic Bellman deep reinforced resource optimization (DGW-SBDR) in fog situations. A Differential Evolution-based Grey Wolf Optimization algorithm based on load balancing has been developed for optimal resource management. The Grey Wolf Optimization algorithm, which employs differential evolution, assigns jobs to virtual machines based on user demands (VMs). In the event of an overutilized VM pool, a grey wolf optimization strategy based on differential evolution can detect both under and overutilized VMs, allowing for smooth transit between fogs. This step disables a number of virtual machines in order to reduce latency. In a Stochastic Gradient and Deep Reinforcement Learning-based Resource Allocation Model, a stochastic gradient bellman optimality function and Deep Reinforcement Learning are integrated for optimal resource allocation. According to the proposed method, QoS may be supplied to end-users by reducing energy consumption and better managing cache resources utilizing stochastic gradient bellman optimality.