The optimal control of reactive powers in electrical systems can improve a system’s performance and security; this can be provided by the optimal reactive power dispatch (ORPD). Under the high penetration of renewable energy resources (RERs) such as wind turbines (WTs), the ORPD problem solution has become a challenging and complex task due to the fluctuations and uncertainties of generated power from WTs. In this regard, this paper solved the conventional ORPD and the stochastic ORPD (SORPD) at uncertainties of the generated power from WTs and the load demand. An Adaptive Manta-Ray Foraging Optimization (AMRFO) was presented based on three modifications, including the fitness distance balance selection (FDB), Quasi Oppositional based learning (QOBL), and an adaptive Levy Flight (ALF). The ORPD and SORPD were solved to reduce the power loss (PLoss) and the total expected PLoss (TEPL), the voltage deviations (VD) and the total expected VD (TEVD). The normal and Weibull probability density functions (PDFs), along with the scenario reduction method and the Monte Carlo simulation (MCS), were utilized for uncertainty representations. The performance and validity of the suggested AMRFO were compared to other optimizers, including SCSO, WOA, DO, AHA, and the conventional MRFO on the IEEE 30-bus system and standard benchmark functions. These simulation results confirm the supremacy of the suggested AMRFO for the ORPD and SORPD solution compared to the other reported techniques.