It is commonly assumed that because males produce many, tiny sperm, they are cheap to produce. Recent work, however, suggests that sperm production is not cost-free. If sperm are costly to produce, sperm number and/or viability should be influenced by diet, and this has been documented in numerous species. Yet few studies have examined the exact nutrients responsible for mediating these effects. Here, we quantify the effects of protein (P) and carbohydrate (C) intake on sperm number and viability in the cockroach Nauphoeta cinerea, as well as the consequences for male fertility. We found the intake of P and C influenced sperm number, being maximized at a high intake of diets with a P : C ratio of 1 : 2, but not sperm viability. The nutritional landscapes for male fertility and sperm number were closely aligned, suggesting that sperm number is the major determinant of male fertility in N. cinerea. Under dietary choice, males regulate nutrient intake at a P : C ratio of 1 : 4.95, which is midway between the ratios needed to maximize sperm production and pre-copulatory attractiveness in this species. This raises the possibility that males regulate nutrient intake to balance the trade-off between pre-and post-copulatory traits in this species.