During the period from 2014 to 2020, approximately 24 out of 44 districts in Jakarta experienced flooding disasters. Notably, at the beginning of January 2020, the Manggarai floodgate recorded a water height of 962 cm, categorized under Alert Level 1, indicating a critical and hazardous situation that required the evacuation of residents to safe places. This circumstance prompted the local government to enhance the monitoring and prediction system for water levels across all floodgates in the DKI Jakarta region. By utilizing improved water height predictions, the government can prepare more effective mitigation measures, such as reinforcing embankments, improving water channels, and implementing preventive actions prior to the occurrence of flooding disasters. The forecasting technique employing Long Short-Term Memory (LSTM) has been widely employed in previous research to predict water heights. Unfortunately, the accuracy of LSTM heavily depends on the manual selection of hyperparameters. The optimization of hyperparameters in LSTM is essential to find the optimal combination of values that influence the performance of the LSTM network. The objective is to maximize the model's performance, such as accuracy or lower error rates on previously unseen data. This optimization process plays a crucial role in achieving good results from the LSTM model, as the right choice of hyperparameters can yield a model that better understands complex patterns in the data. This research aims to determine the optimal hyperparameters using a hybrid optimization method. The hyperparameter optimization involves a combined approach of Sparrow Search Algorithm (SSA) and Particle Swarm Optimization (PSO) known as Hybrid SSA-PSO. This hybrid method is employed to reduce the error rate in predictions. The research outcomes, utilizing the Hybrid SSA-PSO optimization, revealed the smallest Root Mean Square Error (RMSE) evaluation at the Pulo Gadung water gate, measuring 9,553.