It is very significant that both Paul and Peter are very vehement about being subject to civil authorities, because all come from God ( Rom.13:1-7 ). Peter writes something similar in 1Peter 2:13-17. This appear to put the actions of the midwives at cross purpose. In Moral philosophy, there are positions, but ours must be a biblical submission. If a government commands evil as it happened to the midwives, contrary to God, that government may incite a civil disobedience. In line with this, Obadiah resisted Queen Jezebel by hiding the prophets of God in 1Kings 18. Shedrack, Meshack and Abenego demonstrated God’s support for their right to disobey. Peter gave an answer to the Sanhedrin in Acts 5:20, We must obey God rather than men. The midwives were blessed by God. Some say the Israelites built them houses. Others say they were married by Israelites. Yet others believe God gave them wealth and plenty children. Whatever your position, every christian is commanded to pray for those in authority so that God will intervene against ungodly policies( 1Tim.2:1-2). We owe every government that duty.
And it came to pass, because the midwives feared God, that he made them houses. Exodus 1:21 KJV