Here is part of Matthew Henry’s commentaries. Hope it helps.
Pharaoh’s project was secretly to engage the midwives to stifle the men-children as soon as they were born, and then to lay it upon the difficulty of the birth, or some mischance common in that case, Job 3:11. The two midwives he tampered with in order hereunto are here named; and perhaps, at this time, which was above eighty years before their going out of Egypt, those two might suffice for all the Hebrew women, at least so many of them as lay near the court, as it is plain by ch. 2:5, 6, many of them did, and of them he was most jealous. They are called Hebrew midwives, probably not because they were themselves Hebrews (for surely Pharaoh could never expect they should be so barbarous to those of their own nation), but because they were generally made use of by the Hebrews; and, being Egyptians, he hoped to prevail with them. 2. Their pious disobedience to this impious command, v. 17. They feared God, regarded his law, and dreaded his wrath more than Pharaoh’s and therefore saved the men-children alive. Note, If men’s commands be any way contrary to the commands of God, we must obey God and not man, Acts 4:19; v. 29. No power on earth can warrant us, much less oblige us, to sin against God, our chief Lord. Again, Where the fear of God rules in the heart, it will preserve it from the snare which the inordinate fear of man brings. 3. Their justifying themselves in this disobedience, when they were charged with it as a crime, v. 18. They gave a reason for it, which, it seems, God’s gracious promise furnished them with-that they came too late to do it, for generally the children were born before they came, v. 19. I see no reason we have to doubt the truth of this; it is plain that the Hebrews were now under an extraordinary blessing of increase, which may well be supposed to have this effect, that the women had very quick and easy labour, and, the mothers and children being both lively, they seldom needed the help of midwives: this these midwives took notice of, and, concluding it to the finger of God, were thereby emboldened to disobey the king, in favour of those whom Heaven thus favoured, and with this justified themselves before Pharaoh, when he called them to an account for it. Some of the ancient Jews expound it thus, Ere the midwife comes to them they pray to their Father in heaven, and he answereth them, and they do bring forth. Note, God is a readier help to his people in distress than any other helpers are, and often anticipates them with the blessings of his goodness; such deliverances lay them under peculiarly strong obligations. 4. The recompence God gave them for their tenderness towards his people: He dealt well with them, v. 20. Note, God will be behind-hand with none for any kindness done to his people, taking it as done to himself. In particular, he made them houses (v. 21), built them up into families, blessed their children, and prospered them in all they did. Note, The services done for God’s Israel are often repaid in kind. The midwives kept up the Israelites’ houses, and, in recompence for it, God made them houses. Observe, The recompence has relation to the principle upon which they went: Because they feared God, he made them houses. Note, Religion and piety are good friends to outward prosperity: the fear of God in a house will help to build it up and establish it. Dr. Lightfoot’s notion of it is, That, for their piety, they were married to Israelites, and Hebrew families were built up by them.