The reliability and efficiency of electrical power systems are critical for modern industries, which increasingly rely on electric machines and devices. However, power electronic converters add non-linear demands to the electric power distribution systems (EPDS), that can cause power quality (PQ) problems, which could harm electric devices. As a result, EPDS are pointed for the most effective and economical techniques to enhance PQ. Therefore, Dynamic Voltage Restorer (DVR) is employed to maintain voltage stability in modern EPDS. This study focuses on the application of Sliding Mode Control (SMC) in DVRs to protect against voltage dips, enhancing power system sustainability. It details the construction, operation, and control methods of DVRs, comparing the conventional PI-controller with SMC. The arctic puffin optimizer is utilized to get the optimum gains of the PI regulator, and at the same time, it is used to specify the optimal sliding surface required for SMC. A distribution system contains DVR is suggested and implemented utilizing Simulink/MATLAB. The simulation results of the DVR employing SMC and the conventional PI-controller demonstrate a marked improvement in voltage regulation and power quality. Specifically, the SMC-based DVR exhibited a reduction in voltage sag duration and magnitude by approximately 30 % compared to the PI-controller. Additionally, the total harmonic distortion (THD) in the load voltage was reduced by 25 %, indicating a significant enhancement in power quality. These improvements of the enhanced performance of the SMC-based DVR supports the seamless integration of renewable energy sources, which often introduce variability into the power grid.