Network Rail posted a video of the moment the lorry was lifted off the tracks near Wallyford train station.
The lorry crashed yesterday around 1.30 pm, with emergency services attending the scene.
The 41-year-old male driver was taken to hospital by ambulance, though his injuries are not thought to be life threatening.
This morning, Network Rail wrote on social media: “Good progress on repairs overnight, but unfortunately the East Coast Mainline between Edinburgh and Berwick-upon-Tweed hasn't reopened though it's imminent.
"Repairs ongoing to the signalling system, following the HGV destroying a lineside cabinet.
"This will be done as quickly as possible, and we’ll keep you updated.
"Teams overnight successfully removed the HGV and repaired damaged overhead line equipment, boundary and retaining walls and replaced two rails as a precautionary measure.
“We've worked with East Lothian Council to close St Germains level crossing between Prestonpans and Longniddry to road traffic.
"This is so we can fully assess the impact of any signalling system damage to the crossing equipment.
"We’ll continue to work closely with our train operators, who’ve made changes to their timetables for this morning. Please do check your journey before you travel. More soon.”
Police officers in East Lothian are investigating the incident, adding that anyone with any information should contact Police Scotland via 101 quoting reference number 1714 of Thursday, 23 June, 2022.