Widespread delays and cancellations were also caused to ScotRail services on what is now its busiest day of the week.
Some trains were trapped between the stations for about an hour last night.
ScotRail told passengers there would not be space on the replacement buses to get everyone home and some would have to make their own arrangements.
Some London North Eastern Railway, CrossCountry and TransPennine Express trains on the cross-Border east coast main line were also affected.
The fault was reported around 7.30pm last night, with most trains not returned to normal until 11am because of ongoing overnight repairs.
However, the London to Fort William Sleeper service was not expected to arrive until around 2pm when it should have reached the West Highland town shortly before 10am.
The Aberdeen section arrived more than three hours late, shortly before 11am.
The Inverness-bound Sleeper was also delayed by nearly two and a half hours, not arriving in the Highland capital until 11am.
ScotRail said its services had returned to normal by 11am but there were at least four knock-on cancellations.
Lines affected included the main route to Glasgow and three of the others, and those to Aberdeen, Inverness, Perth, Dunblane, North Berwick, Tweedbank and the Fife Circle.
Passengers reported problems continuing into this morning.
Lois tweeted: “Could there at least be some general announcements made at Waverley?
"We've been waiting for over 40min with people crowding at screens for information.
"Not great for social distancing!”
Access to Waverley – Scotland’s second busiest station – was restricted for nearly an hour last night because of the volume of people.
Network Rail tweeted shortly after 7.30pm: “We're currently dealing with an overhead line fault between Haymarket and Edinburgh Waverley.
“We've had to isolate the power supply in the area, including to Edinburgh Waverley.”
At 9pm it added: “Our engineers have confirmed that the overhead wires have been damaged on one line between Edinburgh Waverley and Haymarket.
“We've managed to reinstate power to other lines between the two stations.
"Sincere apologies if your journey has been disrupted this evening.”
A spokesperson said today: “Services were disrupted from around 7pm yesterday owing to overhead line equipment (OLE) tripping between Edinburgh Waverley and Haymarket.
"The power to the OLE could not be restored, which meant services were unable to run between Edinburgh and Haymarket and some trains were trapped for around an hour.
"Some services on the east coast main line through to Newcastle were also impacted.
"An emergency possession was carried out overnight and the issue was fixed in time for the resumption of services this morning.”
Caledonian Sleeper tweeted: “We apologise to guests travelling on our services to Fort William, Inverness and Aberdeen who have been delayed due to the disruption at Waverley station.
"We are working hard to get you to your destination as soon as possible.”
It said of the Fort William service: “Please accept my apologies as I am now aware the service is heavily delayed and is expected around 2pm.”