An attempt is made in this paper to present the application, design, and performance analysis of a novel optimal controller (OC) for automatic generation control (AGC) of interconnected two-area electrical power systems in a deregulated power environment with energy storage units. The OC is designed via full state vector feedback strategy to carry out the study. Swift acting energy storage units such as redox flow batteries (RFBs) are integrated into the power system models, and their efficacy in boosting AGC performance is executed and compared. Initially, the efficacy of OC is investigated in a restructured two-area single-source thermal system, and then, the study is extended to a proposed more realistic restructured two-area multi-source thermal-hydro-diesel-gas power system. It is observed that OC is able to satisfy the AGC requirement under different power contracts in the open electricity market and shows better performance in comparison to a recently published artificial cooperative search algorithm optimized proportional integral controller. MATLAB simulation results demonstrate the improvements in the dynamic performance of the system in the presence of RFB. Sensitivity analysis reveals the robustness of OC under ample variations in the system parameters, initial loading and size and positions of uncontracted load power demands.