Mating is a ubiquitous social interaction with the potential to influence the microbiome by facilitating transmission, modifying host physiology, and in species where males donate nuptial gifts to females, altering diet. We manipulated mating and nuptial gift consumption in two insects that differ in nuptial gift size, the Mormon cricket Anabrus simplex and the decorated cricket Gryllodes sigillatus, with the expectation that larger gifts are more likely to affect the gut microbiome. Surprisingly, mating, but not nuptial gift consumption, affected bacterial community structure, and only in Mormon crickets. The change in structure was due to a precipitous drop in the abundance of lactic-acid bacteria in unmated females, a taxon known for their beneficial effects on nutrition and immunity. Mating did not affect phenoloxidase or lysozyme-like antibacterial activity in either species, suggesting that any physiological response to mating on host-microbe interactions is decoupled from the systemic immunity. Protein supplementation also did not affect the gut microbiome in decorated crickets, suggesting that insensitivity of gut microbes to dietary protein could contribute to the lack of an effect of nuptial gift consumption. Our study provides experimental evidence that sexual interactions can affect the microbiome and suggests mating can promote beneficial gut bacteria.