Don't know; it was one specific substrate I was using (I liked the look); after the third time it happened (yes it happened on 3 aquariums); i ceased using it and haven't had a problem since. The stuff is extremely fine white sand - finer than sand on a beach or play sand.I always keep Malaysian Trumpet Snails, which turn over the substrate, and I keep rooted plants. AFAIK, I’ve never had a problem with H2S in the substrate.
Because fine sand is more densely packed, detritus tends to accumulate on top, rather than getting buried in the sand. Maybe that’s why?