A hierarchical control strategy is proposed to solve the optimal drainage problem in sewer systems by combining an optimization technique known as minimum scaled consensus control (MSCC) with the deep deterministic policy gradient (DDPG) algorithm. The MSCC strategy operates at the global control level, and is used to determine the flows of the hydraulic structures of the drainage system, such that the water is optimally distributed, i.e., wastewater flows are controlled to minimize saturation of water levels and/or flooding events, filling each of the drainage system components (e.g., pipes, tanks, wastewater treatment plants) proportionally to their capacity. On the other hand, the DDPG uses a model-free approach at the local control level, setting the drainage flows by operating valves and gates, without any knowledge of the inherent dynamics, so that it can be used to handle the nonlinearities of the system. Finally, a case study is presented to show the effectiveness of the proposed strategy.