They were suspended in two incidents on separate trains and then allowed to resign rather than be sacked.
Operator Serco is understood to have warned other staff that any further incidents will result in dismissal.
The Office of Rail and Road (ORR), the rail regulator, has asked the firm what action it is taking “to ensure the situation does not happen again”.
The first incident happened at Euston Station in London last week when four members of staff turned up for work on the Highlander Sleeper, which operates to Aberdeen, Fort William and Inverness.
The fifth person was caught in Glasgow, from where the Lowlander Sleeper runs to London.
An industry source said: “Sleeper staff have been told anyone caught from now on, under the influence of any substance, will not be allowed the easy option of resignation.
“That allows the retention of all rail travel passes, pension contributions and the option to be re-employed within the industry with no trace of drunk on duty recorded.”
The cases will come as an embarrassment to the Scottish Government, which split the overnight service from ScotRail four years ago to significantly improve its quality.
Derek Mackay, the-then transport minister, said his ambition was for the Sleepers “to be emblematic of the best of Scotland”.
Ryan Flaherty, Serco’s managing director for Caledonian Sleeper, said: “Our primary priority is the safety of our guests and staff, and we have clear staff policies in place around alcohol consumption.
“Immediately after being made aware of potential breaches, we investigated and can confirm that five members of on-board crew have left the company.”
Serco denied a claim it had not carried out random drugs and alcohol checks on staff, which it is required to do.
It said it “took the poor behaviour of a few of our staff extremely seriously” but it would be “inappropriate” to provide more details.
A spokesperson for the ORR said: “We are aware of the incident and are talking to Caledonian Sleeper about this and what actions the train company is taking to ensure the situation does not happen again.”
A Transport Scotland spokesperson said: “Staff disciplinary issues are a matter for Serco Caledonian Sleeper. There is a zero-tolerance policy towards alcohol and drug use across the UK rail industry.
“The testing procedures put in place by Caledonian Sleeper addressed this issue immediately and ensured passenger safety was maintained.”