Railroad workers had that as a union-negotiated right until at least the 1970s.
Interesting! Makes sense for shift workers who couldn't rely on family to wake them. Same core need.