Robust biological systems are expected to accumulate cryptic genetic variation that does not affect the system output in standard conditions yet may play an evolutionary role once phenotypically expressed under a strong perturbation. Genetic variation that is cryptic relative to a robust trait may accumulate neutrally as it does not change the phenotype, yet it could also evolve under selection if it affects traits related to fitness in addition to its cryptic effect. Cryptic variation affecting the vulval intercellular signaling network was previously uncovered among wild isolates of Caenorhabditis elegans. Using a quantitative genetic approach, we identify a non-synonymous polymorphism of the previously uncharacterized nath-10 gene that affects the vulval phenotype when the system is sensitized with different mutations, but not in wild-type strains. nath-10 is an essential protein acetyltransferase gene and the homolog of human NAT10. The nath-10 polymorphism also presents non-cryptic effects on life history traits. The nath-10 allele carried by the N2 reference strain leads to a subtle increase in the egg laying rate and in the total number of sperm, a trait affecting the trade-off between fertility and minimal generation time in hermaphrodite individuals. We show that this allele appeared during early laboratory culture of N2, which allowed us to test whether it may have evolved under selection in this novel environment. The derived allele indeed strongly outcompetes the ancestral allele in laboratory conditions. In conclusion, we identified the molecular nature of a cryptic genetic variation and characterized its evolutionary history. These results show that cryptic genetic variation does not necessarily accumulate neutrally at the whole-organism level, but may evolve through selection for pleiotropic effects that alter fitness. In addition, cultivation in the laboratory has led to adaptive evolution of the reference strain N2 to the laboratory environment, which may modify other phenotypes of interest.