Where does the expression “asleep at the switch” come from and What does it mean?

The expression “asleep at the switch” means: Unprepared; lacking alertness; inattentive.

Undoubtedly this American expression was originally railway terminology and was almost literal in meaning.

It dates from the time when railroad switches or turnouts were thrown or turned by levers operated by hand, either by switch-tenders or brakemen.

In a freight yard especially, where it was the duty of the switch-tender to shunt cars to the proper tracks, alertness was an essential.

Lack of attention gave rise to the charge that he was “asleep at the switch.”