Effective utilisation of biogas is an important step in increasing usage of renewable energy, due to the great flexibility that solar and wind power in particular lacks. Biogas generated through anaerobic digestion (AD) of sewage sludge addresses environmental concerns together with creating electricity generation potential. There is currently no optimisation-based decision-support framework to determine the best use of biogas from a Waste Water Treatment Plant (WWTP), and provide a market outlook for each of the options. This work proposes a novel multi-period Mixed Integer Linear Program (MILP) model for dispatch and selection of technologies capable of exploiting biogas produced from sludge. The novelty is also highlighted by extrapolating the optimised results to a broader analysis of 855 Italian WWTPs with Population Equivalent (P.E.) > 20,000. The use of real input data provides a unique added value to the work. The modelling framework is applied to several case studies. Results show that 7–23 % savings in operating costs are possible from integrating three systems to exploit biogas, and the trade-offs between capital and operating costs affect the optimal system choice. Furthermore, market driven scenarios are used to analyse how to improve the economic performance.