Many aquatic animals deposit fertilized eggs in adherent clutches or gelatinous masses. Egg aggregation carries certain risks, including the potential for inadequate oxygen supply to embryos. Physical and biological conditions alter such risks. We examined the effects of light levels and associated photosynthetic organisms on the distribution of oxygen inside gelatinous egg masses of four temperate gastropod species. Egg masses of two species, the opisthobranchs Melanochlamys diomedea and Haminoea callidegenita, contained significant populations of diatoms but generally were not associated with macrophytes. Egg masses of the other two species, the opisthobranch Haminoea vesicula and the prosobranch Lacuna sp., occurred commonly on subtidal macrophytes and appeared not to contain significant populations of diatoms. In the laboratory, we used microelectrodes to measure oxygen levels inside masses exposed to alternating dark and light conditions; light level had an enormous influence on oxygen profiles in egg masses of all four species. Masses of H. vesicula and Lacuna sp., when experimentally separated from their macrophytes, showed only slight increases in oxygen upon light exposure, indicating that the main source of oxygen in situ was the macrophyte rather than associated microalgae. Our findings indicate that photosynthesis by macrophytes can drive large changes in internal oxygen profiles.