Understanding the maintenance of genetic variation remains a central challenge in evolutionary biology. Recent empirical studies suggest the importance of temporally varying selection, as allele frequencies have been found to fluctuate substantially in the wild. However, previous theory suggests that the conditions for the maintenance of genetic variation under temporally fluctuating selection are quite restrictive. Using mathematical models, we demonstrate that maternal genetic effects, whereby maternal genotypes affect offspring phenotypes, can facilitate the maintenance of polymorphism in temporally varying environments. Maternal effects result in mismatches between genotypes and phenotypes, thereby buffering the influence of selection on allele frequency. This decreases the magnitude of allele-frequency fluctuations and creates conditions for the maintenance of variation when selection causes fluctuations. Therefore, maternal effects may result in a temporal storage effect ("maternal storage effect"). On the other hand, when selection does not cause fluctuations (e.g., linear negative frequency-dependent selection), maternal genetic effects moderate the relative importance of selection compared to genetic drift and promote stochastic allele extinction in finite populations. Thus, maternal effects can play an important role in the maintenance of polymorphism, but the direction of the effect depends on the nature of selection.