Moktar Ali Saad Mahmoud, 33, and Ibrahim Abugtila, 23, were stationed at Bassingbourn, Cambridgeshire, at the time of the alleged attack.
The defendants both deny rape and aiding and abetting rape.
Mr Abugtila was speaking through an interpreter as the defence opened its case at Cambridge Crown Court.
The alleged victim, in his 20s, was attacked on Christ's Pieces, a park in the centre of Cambridge, in the early hours of 26 October.
Both defendants accepted they had sex with the man but said he consented and invented the rape claim after stealing money from them.
Mr Abugtila told the court he had been walking around Cambridge drunk on the night of the alleged attack, after being turned away from a party at a nightclub.
He and Mr Mahmoud had struck up a conversation with the man in the park at about 03:25 BST, he said. He told the court they had met him earlier in the evening.
Mr Abugtila told the jury the man had touched his groin through his clothing, before kissing him.
"I told him, 'Do you want to have sex with me?' He said 'Yes'."
Both he and Mr Mahmoud then had sex with the alleged victim, he said, but insisted it was consensual.
Last week, prosecutor John Farmer told the jury the alleged victim had been at a wedding, had drunk "formidable" amounts of alcohol and "was in no fit state one way or another to consent".
He said the defendants "behaved like two hunting dogs who had seen a wounded animal".
More than 300 Libyan cadets training at Bassingbourn were sent home early after the allegations came to light.
Up to 2,000 soldiers were expected to undergo basic infantry and junior command training at the barracks under a scheme supporting the Libyan government's efforts to improve the stability of the country following the collapse of the Gaddafi regime in 2011.
The trial continues.
One of two Libyan cadets accused of raping a man in Cambridge has told a court the alleged victim initiated sexual contact with him.