The prime minister announced he had contracted COVID-19 on Friday, with the health secretary also confirming he had tested positive an hour later.
Both MPs said they will be working from home and following self-isolation guidance for people who have tested positive for the virus.
However, Professor Susan Michie of University College London (UCL), said she was unsurprised the government ministers had been diagnosed.
Michie, the director at the University’s Centre for Behaviour Change, said it was likely to have been spread during face-to-face sessions in the House of Commons.
The professor also said common “transmission routes” for the virus - such as touching contaminated surfaces and breathing in droplets in the air - could have contributed to the MPs becoming ill.
Latest coronavirus news, updates and advice
“Whilst the PM was telling people to stay at home and keep at least 2 metres apart from each other, the House of Commons was open for business and face-to-face parliamentary activities were carrying on,” said Michie.
“Given the transmission routes of touching contaminated surfaces and breathing in virus-laden droplets, it should not come as a surprise to hear that the PM and Health Secretary have tested positive for Coronavirus.”
MPs have observed social distancing in the House of Commons, but there has been criticism over Parliament remaining in session during the last two weeks.
Earlier this month, Johnson told reporters he was still shaking hands despite the coronavirus.
Announcing he had “mild symptoms” in a video statement on Friday, the prime minister said: “I have developed mild symptoms of the coronavirus, that’s to say a temperature and persistent cough.
“On the advice of the chief medical officer I have taken a test that has come out positive.
“But be in no doubt that I can continue, thanks to the wizardry of modern technology, to communicate with all my top team to lead the national fightback against coronavirus.”
Meanwhile, the Department for Health today announced a rise of 181 fatalities in 24 hours - bringing the UK death toll to 759.
Friday’s figure - up from Thursday’s total of 578 - showed the biggest daily jump in the UK since the outbreak began.