The six countries are: Turkey, Lebanon, Jordan, Egypt, Tunisia and Saudi Arabia.
The restrictions will apply to laptops, tablets, DVD players and larger phones which are over a specified size. These items will have to be stored in hold luggage instead.
Passengers travelling from the six countries will not be able to bring electronic devices measuring more than 16cm long, 9.3cm wide and 1.5cm in depth into the cabin, according to the Department for Transport.
The UK has followed the US, which has imposed a ban on larger electronic devices from being carried onboard aircraft on some flights.
The Transportation Security Administration (TSA) in US issued a directive regarding electronic devices in cabin luggage on flights from 10 airports in the Middle East and North Africa.
Transport secretary Chris Grayling said in a written statement to Parliament: “Today the government announced there will be changes to aviation security measures for selected inbound flights to the United Kingdom.
“The House will be aware that the United States government made a similar announcement earlier today regarding flights to the United States and we have been in close contact with them to fully understand their position.
“In conjunction with our international partners and the aviation industry, the UK government keeps aviation security under constant review.
“The UK has some of the most robust aviation security measures in the world and at all times the safety and security of the public is our primary concern. We will not hesitate to put in place measures we believe are necessary, effective and proportionate.”
Abta said in a statement: “The immediate priority must be making sure travellers are aware of the new rules and are advised to pack their bags correctly to help minimise disruption through security and protect their items from confiscation.
“We will be working with our members to make sure that their customers are aware of the new requirements and pack their bags accordingly.
“If passengers are travelling with laptops and tablet computers, such as iPads and Kindles, they are advised to contact their travel insurance company ahead of travel as these devices are typically not covered by travel insurance policies either for loss, damage or theft when placed in the hold.”