Peter came to his senses by remembering the Word. He repented of his denial, lying, swearing and cursing.