Is it correct to assume that God, knowing the heart and mind of each of his creation, gives everyone a fair chance to know Him? I am thinking of the jail guards who were fast asleep when the angel delivered Peter, and the Phillipain jailer, who ended up being saved together with his household.
The two incidents you have referred to imply different messages the Holy Spirit wants to reveal. In the Holy Book of Acts 12:1-11, we read of St Peter being delivered from imprisonment by an angel. The message in these verses speaking about his delivery is that the martyrdom of God's servants is always in His Hands. The "Herod" spoke of in these verses is Herod Agrippa, the grandson of Herod the Great who sought to kill the Lord Jesus Christ as a Child.
Herod Agrippa ruled as King of Judea and Palestine under Rome in AD 41-44. St James, the first of the twelve apostles to be martyred, was killed under his reign. Herod's intention was to oppress the Christian population.
With the Philippian Jailer another message is given in the Holy Book of Acts 16:25-35. At midnight St Paul and St Silas were praying and singing hymns with great joy after being beaten. An earthquake occurred and the prison doors opened. The keeper of the prison drew his sword to kill himself knowing that if he did not kill himself, he would have to answer with his life to the escape. St Paul then told him to do no harm to himself. This signifies he was not immediately converted by their testimony and earthquake alone, but by St Paul's intervention. He then wanted to know what he had to do to be saved. This implies after he had heard St Paul and St Silas talk of salvation, he repented, confessed his faith and got baptized with all his family and while in prison, received the salvation preached by the two.