וַיְהִ֕י כִּֽי־יָֽרְא֥וּ הַֽמְיַלְּדֹ֖ת אֶת־הָאֱלֹהִ֑ים וַיַּ֥עַשׂ לָהֶ֖ם בָּתִּֽים׃
И было, потому что акушерки боялись Бога, что Он сделал их домами.
Mei HaShiloach
"And these are the names; And it was that because the midwives feared [the Lord], He made for them houses." - For by the fear of flesh and blood, when a person fears another of flesh and blood, he won't come to any peace of mind, for fear engenders the opposite of peace of mind, however, fear of God brings rest. This, therefore, informs us as to the meaning of "He made them houses", for houses symbolize rest and peace of mind. Therefore, when the midwives gained the peace of mind which follows the proper fear of God, they no longer feared any of Pharaoh's decrees, and this is the meaning of "He made them houses". This is also the meaning of that which is written elsewhere that "Zevulun will dwell by the seashore; He shall be a haven for ships", for water informs regarding proper fear, and ships inform regarding peace of mind, as it is brought down in the Gemara (Bava Metzia 9b) "Ships sit idle"
Rashi
ויעש להם בתים HE MADE THEM HOUSES — houses (dynasties) of the priesthood and the Levites and of royalty which are all termed בתים, “houses”, as it is said, (1 Kings 9:1) “and Solomon built the house of the Lord and the house of the king”: “the house of the Lord” i. e. a dynasty of priests and Levites — from Jochebed (Shifrah); and “the house of the king”, i. e. a royal dynasty — from Miriam (Puah), just as it is stated in Treatise Sotah 11b.
Rashbam
.ויעש להם בתים. A form of house arrest, to prevent them from attending Jewish women about to give birth.