These eggs hatch 'spontaneously' when the enclosed embryo has attained the first stage in the life cycle and is ready for life as a free-living worm.
(the enclosed embryo; is; ready for life as a free-living worm)
the enclosed embryo
is
ready for life as a free-living worm