Gestational diabetes mellitus (GDM) is one of the pregnancy complications that poses a significant risk on mothers and babies as well. GDM usually diagnosed at 22–26 of gestation. However, the early prediction is desirable as it may contribute to decrease the risk. The continuous monitoring for mother’s vital signs helps in predicting any deterioration during pregnancy. The originality of this paper is to provide comprehensive framework for pregnancy women monitoring. The proposed Data Replacement and Prediction Framework consists of three layers which are: (i) IoT Layer, (ii) Fog Layer, and (iii) Cloud Layer. The first layer used IOT sensors to aggregate vital sings from pregnancies using invasive and noninvasive sensors. Then the vital signs transmitted to fog nodes to processed and finally stored in the cloud layer. The main contribution in this paper is located in the fog layer producing GDM module to implement two influential tasks which are: (i) Data Finding Methodology (DFM), and (ii) Explainable Prediction Algorithm (EPM) using DNN. First, the DFM is used to replace the unused data to free the cache space for the new incoming data items. The cache replacement is very important in the case of healthcare system as the incoming vital signs are frequent and must be replaced continuously. Second, the EPM is used to predict the incidence of GDM that may occur in the second trimester of the pregnancy. To evaluate our model, we extract data of 16,354 pregnancy women from medical information mart for intensive care (MIMIC III) benchmark dataset. For each woman, vital signs, demographic data and laboratory tests was aggregated. The results of the prediction model superior the state of the art (ACC = 0.957, AUC = 0.942). Regarding to explainability, we utilized Shapley additive explanation framework to provide local and global explanation for the developed models. Overall, the proposed framework is medically intuitive, allow the early prediction of GDM with cost effective solution.