In an attempt to assess the diversity of viruses and their potential to modulate the metabolism of functional microorganisms in anaerobic digesters, we collected digestate from three mesophilic anaerobic digesters in full-scale wastewater treatment plants treating real municipal wastewater. The reads were analyzed using bioinformatics algorithms to elucidate viral diversity, identify their potential role in modulating the metabolism of functional microorganisms, and provide essential genomic information for the potential use of virus-mediated treatment in controlling the anaerobic digester microbiome. We found that Siphoviridae was the dominant family in mesophilic anaerobic digesters, followed by Myoviridae and Podoviridae. Lysogeny was prevalent in mesophilic anaerobic digesters as the majority of metagenome-assembled genomes contained at least one viral genome within them. One virus within the genome of an acetoclastic methanogen (Methanothrix soehngenii) was observed with a gene (fwdE) acquired via lateral transfer from hydrogenotrophic methanogens. The virus-mediated acquisition of fwdE gene enables possibility of mixotrophic methanogenesis in Methanothrix soehngenii. This evidence highlighted that lysogeny provides fitness advantage to methanogens in anaerobic digesters by adding flexibility to changing substrates. Similarly, we found auxiliary metabolic genes, such as cellulase and alpha glucosidase, of bacterial origin responsible for sludge hydrolysis in viruses. Additionally, we discovered novel viral genomes and provided genomic information on viruses infecting acidogenic, acetogenic, and pathogenic bacteria that can potentially be used for virus-mediated treatment to deal with the souring problem in anaerobic digesters and remove pathogens from biosolids before land application. Collectively, our study provides a genome-level understanding of virome in conjunction with the microbiome in anaerobic digesters that can be used to optimize the anaerobic digestion process for efficient biogas generation.