AbstractOptimal foraging theory predicts that well‐defended potential foods should be exploited only when energy pay‐offs are great. Although stinging hymenopteran nests are both well‐defended and predated by primates, their larvae's energy yields rarely have been calculated, and predation‐linked foraging behaviours by primates infrequently documented. Based on 58 opportunistic observations of primates raiding wasp nests for larvae, we calculated energetic yields of low‐ and high‐risk wasp nest predation for Cebus albifrons, Saimiri collinsi, S. sciureus and Sapajus apella, and tested predictions derived from optimal foraging theory. We recorded how nests were processed and by which age‐sex classes, eaten nest fragment sizes, number of occupied and empty cells, and nest occupancy patterns (percent larvae/pupae, eggs, empty cells). Basal metabolic rate (BMR) calculations showed energetic yields from 15 min foraging on low‐risk nests (Polybia quadricincta) would meet energy needed to sustain adult female and male C. albifrons BMR for 4.9 and 4.5 h, respectively; yields from high‐risk (Chartergus artifex) nests for 6.5 and 6.2 h; Mischocyttarus sp. nest yields (low risk, but mimetically resembling other wasps) would meet S. collinsi BMR for 2.9 h (female) and 2.3 h (male), and 2.6 and 2.1 h, for the slightly larger S. sciureus, respectively. The Chartergus energetic‐yield value is nearly 20% of a 36 g chocolate bar (741 kJ). Our data provide quantitative support for the common assertion that wasp larvae and pupae are high‐yield foods for primates. As predicted by optimal foraging, energetic yield is sufficient to offset the risk and pain of being stung.