The 28-year-old suffered serious burns to his left leg and had to be lowered to the ground on ropes by firefighters before being taken to hospital by ambulance last night.
Initial reports suggested the man had fallen through the glass ceiling above the station and landed on overhead power lines.
However, eyewitnesses at the station said the casualty was a homeless man who had climbed into the scaffolding to bed down for the night when he brushed against a live wire.
Five ambulances and four fire engines assisted in the rescue operation, which was launched at around 7.30pm.
A shop worker at the station, who witnessed the aftermath, said: “Apparently it was a homeless man who tried to climb into the scaffolding and got electrocuted.
“He is not dead but there were loads of paramedics and firemen here getting him down. They had to close the track so the emergency services could take him away.”
A spokesman for British Transport Police said: “A male was located on a scaffolding walkway adjacent to overhead lines with serious burns. The male was rescued from this location and taken to Edinburgh Royal Infirmary for treatment to his injuries.”
He added that inquiries into the incident were ongoing.
The incident closed several platforms and disrupted at least 24 trains for around an hour.
A rail passenger said: “They turned the power off within parts of the station to assist the firemen. There’s a few trains cancelled now and there’s bound to be lots of delays and knock-on effects. From what I could see it was the East Coast mainline that was affected.”
Platforms seven to ten had to be shut down as the rescue bid was mounted and a spokeswoman for Network Rail, which operates Waverley, said at least 24 trains had been disrupted, though none of this morning’s services were disrupted.
She said: “We know at least 24 services have been disrupted from when the incident took place at 7.30pm to when we were able to get everything back up and running at around 8.30pm.”
“Platforms seven to ten were closed off to allow access for the emergency services and to keep passengers clear, and we had to isolate the power at one stage to assist the emergency services.
“There will be some knock-on delays as we try to get everything back to the timetable.”
The Network Rail spokeswoman added that it would be working with police to ascertain exactly what happened.
A spokeswoman for Lothian and Borders Fire and Rescue Service said: “A 28-year-old male with burns to his left leg was lowered from scaffolding using line equipment after being electrocuted. Crews from Tollcross and height appliances from Newcraighall attended the incident at Waverley Station at 7.30pm and returned at 8.50pm.”
A spokesman for the Scottish Ambulance Service said five vehicles, including a rapid response team and accident and emergency crews, attended the incident.
He said: “We uplifted a casualty from Waverley station and brought him to Edinburgh Royal Infirmary at 9.10pm. He was conscious and breathing,