One must be careful about taking analogies beyond their intended scope. A few facts relative to the question to help set the background here include:
Amniotic fluid, though it starts pure, later can include the fetal excrement (called meconium).
Noah's family spent far more than 40 days in the ark. The rains fell for 40 days, but they were in the ark from ...
I certainly don't claim any of these thoughts are original to me, but I see a comparable connection.
Jesus often used metaphors that were familiar to people to illustrate a point.
Physical birth involves:
Water (as noted in the OP)
Spirit (see Genesis 2:7)
Blood (I didn't really appreciate this until my the birth of my children)
Spiritual rebirth involves: