The extraordinary advice formed part of security guidance issued to the Prime Minister and her staff before their visit to China, where the meeting of world leaders begins today.
While Mrs May has pledged to use the conference to herald in a “golden era” for post-Brexit Britain, she has been warned to keep her wits about her.
One Whitehall source said security chiefs had told the party that hotel rooms used during the summit were likely to be bugged.
“We have been told that if you feel uncomfortable about people seeing you naked, you should change under your bedclothes,” the source said.
Government aides have fallen victim to spying on previous official visits to China, with one Downing Street official reported to have had his mobile phone and secret documents stolen after he was seduced.
Security chiefs anxious to avoid a repeat of the incident, which took place during a visit by Gordon Brown in 2008, have since provided detailed guidance to Mrs May’s team about the steps they should take to protect themselves.
Officials travelling with Mrs May have even been issued with temporary mobile phones and email addresses in an attempt to evade Chinese state hackers.
Security advisers are also telling staff not to keep gifts they receive and to be particularly wary of electronic devices, such as free computer memory sticks, mobile phone SIM cards or chargers offered by their Chinese hosts.
Last night Dai Davies, former head of the Royalty and Diplomatic Protection Department, which provides security for the PM, senior ministers and members of the Royal Family, said: “When it comes to spying, the Chinese are on a par with the Russians.
“These people will use every trick in the book. Those accompanying Theresa May to the G20 summit will have been advised to take every precaution possible, from their communications to their sexual conduct.
“Honey traps, for instance, are very common along with bugging and interception of text messages and emails.”
During Mr Brown’s visit to China in 2008, one of the Number 10 officials accompanying the then Prime Minister reportedly fell prey to a “beautiful” female Chinese spy.
She went back to his hotel room, drugged him and stole his phone and documents from a briefcase.
The incident was described by Mr Brown’s former spin doctor Damian McBride in his 2013 memoir Power Trip.
He recalled that the Number 10 team had been “accosted on one side by a beautiful posse of Chinese girls and on the other side by an equivalent group of Russian blondes”.
Mr McBride wrote: “Even before our resident security expert could warn us that their interest was not to be taken at face value, we looked up and saw one of our number disappearing up the stairs to the exit with one of the girls, beaming back at us.
“He woke up the following morning minus his Blackberry and half the contents of his briefcase.”
The official also had a “very bad headache, owing to the Mickey Finn nightcap his overnight companion had administered to him in his hotel room,” he added.
The G20 summit in Hangzhou comes at a time when relations between Britain and Beijing are particularly sensitive after Mrs May delayed the Government’s decision on a new nuclear power station at Hinkley Point.
This prompted China’s threatened withdrawal of its £100million investment in the project on the Somerset coast.
The Prime Minister is expected to tell President Xi Jinping during their first meeting at the summit that she will not reach a final decision on the £18billion plant until later this month, amid concerns she may block a deal.
Last month Mrs May was urged to pull the plug on the scheme over fresh Chinese spying allegations.
The extraordinary advice formed part of security guidance issued to the Prime Minister