In recent power grids, the need for having a two-way flow of information and electricity is crucial. This provides the opportunity for suppliers and customers to better communicate with each other by shifting traditional power grids to smart grids (SGs). In this paper, demand response management (DRM) is investigated as it plays an important role in SGs to prevent blackouts and provide economic and environmental benefits for both end-users and energy providers. In modern power grids, the development of communication networks has enhanced DRM programmes and made the grid smarter. In particular, with progresses in the 5G Internet of Things (IoT), the infrastructure for DRM programmes is improved with fast data transfer, higher reliability, increased security, lower power consumption, and a massive number of connections. Therefore, this paper provides a comprehensive review of potential applications of 5G IoT technologies as well as the computational and analytical algorithms applied for DRM programmes in SGs. The review holistically brings together sensing, communication, and computing (optimization, prediction), areas usually studied in a scattered way. A broad discussion on various DRM programmes in different layers of enhanced 5G IoT based SGs is given, paying particular attention to advances in machine learning (ML) and deep learning (DL) algorithms alongside challenges in security, reliability, and other factors that have a role in SGs’ performance.