For days Mr Johnson resisted pressure to adopt the World Health Organization advice, with his deputy chief medical officer, Jenny Harries, saying the evidence on whether children over 12 should wear masks in schools was "not strong".
In Scotland and Northern Ireland, secondary school pupils will have to wear masks in corridors and communal areas, and in parts of England under local lockdown measures.
The WHO changed its advice over the weekend, saying everyone over the age of 12 should wear a face covering where social distancing is more hard.
"Outside of local lockdown areas face coverings won't be required in schools, though schools will have the flexibility to introduce measures if they believe it is right in their specific circumstances", he said on Wednesday.
But she said having pupils wearing face masks in canteens, corridors and communal areas was problematic, with storage issues, and pupils taking them on and off, with concerns that they should not "create a biohazard around schools".
"However, staff and pupils may wish to use them during the routine school day and this is acceptable", he said.
Johnson said his government would change the advice on face coverings in schools "if we need to". "I hope these steps will provide parents, pupils and teachers with further reassurance", UK Education Secretary Gavin Williamson said.
The WHO issued new guidance on 21 August, saying "children aged 12 and over should wear a mask under the same conditions as adults, in particular when they can not guarantee at least a one-metre distance from others and there is widespread transmission in the area".
The change is being seen as another policy U-turn, just weeks after ministers were forced to scrap the use of an algorithm which gave 17- and 18-year-olds lower-than-expected exam grades.
Principal Hilary Wood said it was about the "safe restart of the school". That furor claimed its first casualty Tuesday with the resignation of Sally Collier, head of the exams regulator Ofqual.
Within the United Kingdom, which has Europe's highest virus-related death toll, Scottish schools reopened first, followed by those in Northern Ireland, while schools in England and Wales are due to reopen in September. Schools in England and Wales are due to reopen in September.
"The government should have given clear guidance and a plan to deliver it", she said.
Teaching unions had called for the United Kingdom government, which is responsible for education in England, to follow Scotland, which has a separate education system, and already requires pupils to cover up between lessons.