The rapid development in medical devices and communication technologies led to the emergence of the Internet of Medical Things (IoMT), resulting in several new applications that connect to healthcare IT systems through online computer networks. A vast quantity of data produced by these applications will be received at the edge gateway periodically to transmit them to the remote cloud for further handling. However, sending this huge data to the cloud across the IoT network will place a significant burden on the IoT network. The long processing delays and exchanged data have a considerable influence on the real-time IoT applications response time. The responsiveness time of these applications will be decreased. Therefore, the IoT applications exploit the advantages of fog computing, which serves as a middle layer between the platform of cloud and IoT devices to minimize the transmitted data and enhance the response time. In this paper, we propose an efficient compression technique (ECoT) for reducing transmitted Electroencephalography (EEG) data without loss on the IoMT Networks based on Fog Computing. The ECoT combines three efficient data reduction techniques: DBSCAN clustering, Delta encoding, and Huffman encoding, to decrease the volume of data in the Fog node then sending it to the platform of cloud. First, the DBSCAN clusters the EEG data into clusters. Then, the Delta encoding is applied to the indices of EEG data in each cluster. Finally, the Huffman encoding encodes the vector of differences for each cluster. The encoded data from clusters is combined into a file to be sent to the platform of cloud. The results show that the ECoT technique introduced improved results in terms of compression ratio, sent data, compression power, and compression and decompression times compared with other methods.