Biodiesel is an important source of renewable energy, whose production generates wastewater (BWW) comprised mainly of glycerol as the source of organic matter (COD). Anaerobic digestion of BWW is a promising technique for the remediation of this environmental hazard. Anaerobic biodegradation of glycerol present in BWW is influenced by parameters such as reaction time, amount of biomass inoculum and operating temperature. The objective of this work was the optimization and mathematical modeling of these parameters to maximize the performance of an anaerobic sequencing batch reactor (AnSBR) for treating BWW. The amount of biomass inoculum had the greatest influence on COD removal efficiency. Temperature and reaction time had greater influence on behavior of the parameters responsible for AnSBR buffering, including total volatile acids and total, partial, intermediate and bicarbonate alkalinities. Even when operated under loading rates above the values reported in the literature, the AnSBR presented satisfactory performance. The mathematical model generated in this work can be used for forecasting, process control and reactor scaleup.