Cardiac disease is considered as the one of the deadliest diseases that constantly increases the globe's mortality rate. Since a lot of expertise is required for an accurate prediction of heart disease, designing an intelligent predictive system for cardiac diseases remains to be complex and tricky. Internet of Things based health regulation systems are a relatively recent technology. In addition, novel Edge and Fog device concepts are presented to advance prediction results. However, the main problem with the current systems is that they are unable to meet the demands of effective diagnosis systems due to their poor prediction capabilities. To overcome this problem, this research proposes a novel framework called HAWKFOGS which innovatively integrates the deep learning for a practical diagnosis of cardiac problems using edge and fog computing devices. The current datasets were gathered from different subjects using IoT devices interfaced with the electrocardiography and blood pressure sensors. The data are then predicted as normal and abnormal using the Logistic Chaos based Harris Hawk Optimized Enhanced Gated Recurrent Neural Networks. The ablation experiments are carried out using IoT nodes interfaced with medical sensors and fog gateways based on Embedded Jetson Nano devices. The suggested algorithm's performance is measured. Additionally, Model Building Time is computed to validate the suggested model's response. Compared to the other algorithms, the suggested model yielded the best results in terms of accuracy (99.7%), precision (99.65%), recall (99.7%), specificity (99.7%). F1-score (99.69%) and used the least amount of Model Building Time (1.16 s) to predict cardiac diseases.