Biomass conversion processes have the potential for satisfying approximately 25% of the national demand for methane gas. At the present time, very little analytical work has been done to optimally design and operate the production facilities associated with these processes. This study was motivated by the high cost of these systems and the attendant need for efficient operation. While in storage, biomass decays (exponentially) over time, and gas production declines (exponentially) with time. The basic operational problem is to determine the optimal residence times for batches in the anaerobic digester to maximize total production over a fixed planning horizon. This paper provides analysis to characterize the form of the optimal policy and presents an efficient algorithm for obtaining the solution. An example problem, based upon realistic biomass and digester data, is used to illustrate the algorithm as well as the behavior of the optimal solution.