Sean Clode, 21, and the girl, who cannot be identified, were found by a police helicopter on the beach on the outskirts of Hartlepool the day after she was reported missing by her parents, Teesside Crown Court heard.
Her father had set off looking for her from northern Scotland and was on his way to north-east England after her mobile phone was traced to the area when she was found, the jury heard.
Clode, of Hartlepool, denies sexual grooming, abducting a child and two counts of sexual activity with a child. The alleged offences were said to have happened in May.
He and the girl had been communicating for months over the internet after striking up a friendship playing Xbox games, the jury heard.
She asked her mother if she could stay at a friend's house after school on May 24 after showing a text message from the girl's mother inviting her over.
But the jury was told the girl did not go to school and, instead, travelled by train to Hartlepool.
At 2.30pm on Saturday, the day after she went missing, the police helicopter looking for the girl located a tent with two people in it on dunes. Clode was arrested.
The jury was told the girl and the defendant had chatted online every day and had told each other they were in love.
On the day she was supposed to go on the sleepover, she had bought a tent and took a train to Hartlepool, where Clode met her and they took a taxi to the dunes.
Mr Bean said: "The prosecution accept that (the girl) willingly agreed to travel down to meet the defendant. You may also find she was aware they may have sex.
"The defendant knew however that (the girl) was a young teenage girl and by this time he was 21.
"Rather than bringing the online conversations to an end, he allowed them to continue over many months."
The day after police found them, the girl told officers in a videoed interview they had sex several times during the night, the court heard. But in a further interview about four weeks later she said they had not had sex, jurors were told.
Mr Bean said there was scientific and medical evidence which supported the account she first told police.
Clode told police they had not had sex and denied arranging the meeting, claiming she rang him on May 24 to tell him she had arrived in Hartlepool.
Giving live evidence via videolink, the girl maintained Clode's account that they did not have sex.
The teenager agreed with Rebecca Brown, defending, that in her first police interview she lied, and that could have seen Clode jailed.
The trial continues.