This paper proposes a model-based methodology that allows synthesising the most appropriate strategies for optimising the operation of wastewater treatment plants (WWTPs). The methodology is applied with the aim of maximising the nitrogen removal in membrane bioreactors (MBRs). The proposed procedure is based on a systematic approach composed of four steps. First, a sensitivity analysis of the input variables is carried out in order to obtain a first assessment of the potential for operational improvements. Then, the optimum input variable values are calculated by a model-based optimisation algorithm that minimises a cost function associated with the effluent total nitrogen at different temperatures. Then, the optimum operational strategies are identified. Finally, these operational strategies form the conceptual knowledge base for designing automatic control laws. The obtained optimal control strategies have shown a significant improvement in performance in comparison with fixed operation for the studied case, reducing the total nitrogen by 40%.