A drunk man who passed out sprawled across railway tracks in the middle of the afternoon is due to be sentenced.
Kevin Craswell, who had his head on the track and his feet inches from the live rail, could be heard snoring at Epsom.
Trains were disrupted and police filmed the former company director from a helicopter as he slept in March.
Craswell, 48, of Ashtead, Surrey, who admitted obstructing the railway by neglect faces up to six months in jail when he appears before magistrates.
The court heard staff had to switch off power and thousands of people on four routes were affected by delays.
I've never seen anything like it
PC Keith Board
CCTV footage from a police helicopter showed a train being diverted to avoid hitting Craswell, who is now unemployed and was taken to hospital after the incident near Epsom.
PC Keith Board, of British Transport Police, said: "I've never seen anything like it in all my years of policing.
"It was truly remarkable that he wasn't struck by a train or fatally electrocuted.
"The position he collapsed in meant his feet were only a short distance from the live rail."
He added: "In total, four railway lines were impacted, costing almost £8,000 in delays.
"Trains had to stop running and the power was turned off so that police and emergency crews could safely get to him."
Craswell is due to be sentenced by magistrates at Redhill.