You're likely thinking of "Many Waters" by Madeleine L'Engle (1986). But despite the enigmatic title, it's not a mystery novel—it's the fourth book in the Time Quintet (following A Wrinkle in Time, A Wind in the Door, A Swiftly Tilting Planet), blending science fiction, biblical allegory, and family saga.
Teenage twins Sandy and Dennys Murry (the "normal" siblings in a family of geniuses) accidentally activate their parents' tesseract experiment and are flung back to pre-Flood Noah's era. There, they encounter nephilim, seraphim, a miniature mammoth, and a Noah who's far more human than Sunday school stories suggest. The twins must navigate ancient politics, their own growing feelings, and the looming deluge—all while trying to find a way home.
If you're hunting for a specific mystery by L'Engle, she didn't really write them. But if you want a haunting, lyrical time-travel story about faith, family, and the cost of knowledge—Many Waters is a masterpiece waiting to be reread.