Mr Crabb, who served in the Cabinet for two years as Welsh Secretary and then at Work and Pensions told the Prime Minister he was stepping down "in the best interests of my family".
The Preseli Pembrokeshire MP, promoted to the post in March, resigned "in the best interests of my family", he said.
Stephen Crabb stepped down from his position as Work and Pensions Secretary on Thursday whilst Theresa May made many "high profile sackings".
Tory MP Glyn Davies said Mr Crabb still has a big contribution to make.
'After careful reflection I have informed the Prime Minister today that, in the best interests of my family, I can not be part of her Government at this time. "He's a very effective Secretary of State for Work and Pensions and must continue with that work".
'I am grateful to my whole team for their hard work and encouragement.
The messages allegedly show the devout Christian telling the woman he wanted to kiss her "everywhere" and stating his desire to perform a sex act on her.
Mr Crabb is one of the highest profile Christians in United Kingdom politics and had previously served as Welsh Secretary.
He added: 'People trip up in all kinds of ways. Add in the adrenalin, the attention u get, and the time away from family.toxic mix'.
He asked the woman, in her twenties, what she was going to do about his "downstairs situation" during the late-night exchange on the messaging service WhatsApp.