Tareena Shakil also claimed to have bribed a taxi driver $50 (£35) to take her part of the way before she dashed across the Turkish border, under the noses of a three-man IS patrol.
The 26-year-old said she went to Syria to live under the rule of sharia law after telling friends she was off on a family beach holiday to Turkey in October 2014.
Shakil – who denies being a member of IS, also known as Isis – and of encouraging acts of terror on social media, was giving an account of her escape in January last year.
She told a Birmingham Crown Court jury, she had been kept in a mansion with other single women in the self-declared caliphate’s capital of Raqqa, where her phone and internet use were closely monitored.
However, she claimed that on 4 January the chance arrived for her and her son to leave, under the guise of her running an errand to a local internet cafe. With the help of another woman, whom she named only as Tania from Trinidad in the Caribbean, she used the opportunity while out of the mansion to bed down in a safe house before taking her son to the bus stop on 7 January.
Asked how she got out of Raqqa – a city the jury has been told is guarded by as many as 5,000 IS fighters and boasts a specialist all-women police unit – the former college student said: “It was a bit difficult but in the end they let me get on the bus.”
She described being taken to an office, decorated with the black flag of IS, and staffed by two men sat at a desk talking in Arabic.
Shakil fed the men a false story about needing to go to the city of Jarabulus, via the town of Manbij, because she was travelling to meet her husband.
She said: “They talked among themselves in Arabic and how it ended, with him saying ‘ok let her go’, giving the authority for me to go on the bus from Manbij, to Jarabulus.”
She switched to a taxi in Manbij, and asked the male driver to take her to a border town.
Shakil said: “Firstly, he was reluctant to take me and I had to persuade him. I bribed him with money.”
The former health worker said that having driven through a series of vehicle checkpoints without incident she told the driver to stop as he got to within 1km of the Turkish border.
The jury has already heard how, once she got across a line of barbed wire, Shakil handed herself in to a Turkish military patrol.
The trial continues