The caustic fluid burned through pipework, leaving many passengers without water in the train’s brand new en-suite toilets, basins and showers.
All 75 carriages in the fleet were affected by the error, which is believed to have been caused by a firm acting for Spanish train manufacturer Construcciones y Auxiliar de Ferrocarriles (CAF), rather than Sleeper operator Serco.
The problem was only discovered after politicians and other special guests boarded the inaugural service from Glasgow to London in April.
It is also thought to have affected sensors which monitor water levels, leading to toilets elsewhere in the train closing down.
However, the cause was not established until later, which led to major repairs.
An industry source said: “It was like the wrong kind of bleach being used, which reacted with the stainless steel of the pipes throughout the system.
“There has been a progressive programme to go through all the carriages, some of which were in worse condition than others.
“One set of carriages, which sat with the chemical in them for some time, was the worst affected.”
The Scottish Government’s Transport Scotland agency, which is in charge of Serco’s 15-year franchise, said fines would be issued.
Its spokesperson said: “We were made aware of the issues with water systems in two units during the introduction of new vehicles, caused by errors in CAF’s preparation of new trains for service.
“Affected vehicles have been through repair, with some already returned to service with no recurrence of original faults.
“Clearly, passengers should expect the highest quality facilities on Caledonian Sleeper services. Financial penalties apply where standards are not met.”
Graham Taylor, CAF programme director for Caledonian Sleeper, said: “CAF and Serco continue to work collectively to solve problems and improve the passenger experience.”
Ryan Flaherty, Serco managing director of the Caledonian Sleeper, said: “Bringing our new trains into service has been very complex and challenging.
“We have been working closely with all our partners to resolve the issues that we have faced and we are pleased with the progress that has been made.”
Revelation of the cause of the water problems comes days after cleaning company Leadec did not have its contract renewed following complaints of cabins being left filthy and litter-strewn.
A series of technical problems have also hit the new trains, which operate between Edinburgh, Glasgow and London.
They include emergency brakes being accidentally triggered, causing significant damage to wheels.
These have led to a delay in the trains’ introduction on the Aberdeen, Fort William and Inverness to London “Highlander” routes until at least later this month.
Transport Scotland said: “While the introduction of new trains often presents significant challenges, the levels of unreliability and further delay to Highlander introduction is simply unacceptable.”