Biomass is an attractive energy source that can be used for production of heat, power, and transport fuels, and when produced and used on a sustainable basis, can make a large contribution to reducing greenhouse gas (GHG) emissions. Anaerobic digestion (AD) is a suitable technology for reducing organic matter and generating bioenergy in the form of biogas. This study investigates the factors allowing the optimization of the process of biogas production from the co-digestion of wheat straw (WS) and bovine manure. The statistical analysis of the experiments carried out show that ultrasonic processing plays a fundamental role by sonication density and solids concentration leading to improved characteristics of WS by reducing particle size and increasing concentration of soluble chemical oxygen demand. The higher the sonicating power used, the more the waste particles are disrupted. The optimality obtained under mesophilic conditions for WS pretreated with 4% w/w (weight by weight) H2O2 at temperature 36 °C under 10 minutes of ultrasonication at 25 kHz improves the methane yield by 64%.