Parastizopus armaticeps (Coleoptera: Tenebrionidae), a nocturnal fossorial detritivore inhabiting southern Kalahari dunes, aggregates in burrows during the day. Group size increases during drought but 25% of beetles are still found alone or in pairs. During drought, beetles from large groups leave burrows after sunset synchronously and carlier than pairs and single animals and earlier than beetles of any group size after rain. Detritus from the beetles' major foodplant is scarce and food competition high. Beetles emerging early preferentially select and carry high-quality transportable items into burrows to eat (forage); late-emerging ones feed on the low-quality large twigs on the surface. Foraging is shown to be a strategy to secure food items against surface competitors, not one to reduce body water loss during surface exposure. The costs and benefits of group vs. solitary lifestyles and alternate hypotheses for early and synchronous emergence were tested experimentally. Grouped beetles had lower body water loss rates but, due to competition with burrow mates, higher feeding costs than single ones. It is hunger that advances and thus synchronizes emergence time, not social facilitation. Field data support a model predicting that, for maximal benefits, beetles should alternate between solitary and group life at optimal time intervals.