Some train drivers do not drink water, tea or coffee when on duty to avoid having to go to the toilet because of the lack of facilities, according to a trade union.
Aslef said staff, and passengers, deserved to have access to decent toilets and washing facilities.
The union said a lack of access to safe, clean toilets and problems workers have to access them during their working day was a “real problem” on the railway.
General secretary Mick Whelan said: “It’s an occupational health and safety issue as well as one of basic human rights.
“Access to toilets and washing facilities is essential for good public health and to prevent the spread of disease.
“The Covid-19 coronavirus pandemic has thrown into stark relief the importance of hygiene and access to adequate toilet and hand washing facilities in the prevention of the spread of transmissible diseases.
“When the train and freight operating companies are commissioning a new train they should build and design it with a staff toilet on board.
“Some firms are fitting camping toilets on old trains, and while not great, freight drivers say a camping toilet is better than a bush.”
Aslef said some train drivers do not drink water, tea or coffee to avoid having to go to the toilet during their shift.
The union spoke out on World Toilet Day, an official United Nations international observance day designed to inspire action to tackle the global sanitation crisis.
Mark Todd, national officer of Usdaw, which represents retail workers and delivery drivers, said: “Drivers have worked tirelessly as key workers throughout the pandemic period, keeping the country running by delivering essential supplies.
“It is a disgrace that many drivers report being denied access to the most basic facilities, such as toilets, whilst carrying out their essential roles.
“Drivers deserve to be treated with dignity at work, and must be able to access clean toilet facilities at sites where they are making a delivery.”
He added: “Poor facilities for drivers are making the industry less attractive and causing issues with recruitment and retention, at a time when there is a national shortage of drivers.”
Unison assistant general secretary Jon Richards said: “Council cuts over the past decade have had a significant impact on access to public toilets. More than a fifth have closed in Britain since 2010.
“It’s a serious worry for people who work outside, travel as part of their job or spend time out and about. The pandemic has shown the importance of regular handwashing, but that’s tougher with so many sites closed.”