A signalman responsible who went on a drinking session before his shift was today jailed for 60 days.
Paul Clear, 57, nodded off in his signal box at Lancing and was later found to be nearly twice the legal drink-drive limit.
Clear, of North Lane, East Preston, was sentenced by Worthing magistrates.
He had already admitted working on the railway after consuming excess alcohol.
The court was told he was responsible for monitoring the safety of four level crossings on the Brighton-Worthing line.
He was found slumped in the corner of the signal box at Lancing station by colleagues who immediately raised the alarm.
Peter Lytle, prosecuting, said it happened on September 16 last year while Clear was working with two other members of staff.
Kirsten Sharp, defending, told the court that Clear, a father-of-six, had been sacked and "bitterly regretted" what had happened.
She said he was now seeking medical help at his own expense and was selling his property to pay for it.
Miss Sharp said: "There was a potential risk on this occasion and not an actual risk. He was holding up trains and not having them careering into each other."
She also told the court that Clear was at risk of "self harm" because of trauma caused by the publicity surrounding the case.
She said: "I would argue he is a man who has suffered enough."
District judge Paul Tain told Clear the case was so serious that only a custodial sentence could be justified.
He told him: "Whether you were stopping or starting trains or doing anything else you were unequivocally, categorically and seriously putting members of the travelling public at risk in a way which is manifest to all of us."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article