The mammalian intestinal tract contains a complex microbial ecosystem with many lysogens, which are bacteria containing dormant phages (prophages) inserted within their genomes. Approximately half of intestinal viruses are derived from lysogens, suggesting that these bacteria encounter triggers that promote phage production. We show that prophages of the gut symbiont Lactobacillus reuteri are activated during gastrointestinal transit and that phage production is further increased in response to a fructose-enriched diet. Fructose and exposure to short-chain fatty acids activate the Ack pathway, involved in generating acetic acid, which in turn triggers the bacterial stress response that promotes phage production. L. reuteri mutants of the Ack pathway or RecA, a stress response component, exhibit decreased phage production. Thus, prophages in a gut symbiont can be induced by diet and metabolites affected by diet, which provides a potential mechanistic explanation for the effects of diet on the intestinal phage community.