A high penetration of renewable energy sources such as wind power generation and photovoltaic generation causes some problems in power systems such as the duck curve and unreliability due to environmental variability. An effective solution to this problem is Demand Response (DR). Electric Water Heaters (EWHs) are considered ideal candidates for DR due to their energy storage capability.Due to the benefits, control strategies or techniques for EWHs have received considerable academic attention. The energy sector has recently tapped into the disruptive artificial intelligence world to learn, among other related priorities, how to enhance operations, maintain energy resilience and improve consumer service. Consequently, this paper reviews the use of machine learning (ML) for optimization and scheduling of EWHs. The main contributions of this review paper are, firstly, to identify state of the art of energy optimization and scheduling of EWHs. Secondly, to review the current ML models for energy optimization and scheduling of EWHs in smart grids and smart building environment. While classical control strategies may deliver substantial improvements, optimum efficiency may not be reached. ML has demonstrated clear advantages over classical control. Based on these conclusions, recommendations for further research topics are drawn.