It was the nascent bald patch on one of the helpers and the strawberry blond mop on the other that gave the game away.

Since dawn, Princes William and Harry had been discreetly helping the flood relief efforts around the Berkshire village of Datchet with a platoon of soldiers from their regiment, the Household Cavalry, when their cover was finally blown by the Guardian.

Watching the TV pictures from their Kensington Palace apartments, the pair had been planning to get involved in a private capacity for a couple of days, and had hoped to keep out of the spotlight. Shortly after 10am, they were limbering up, about to put some royal muscle into lugging sandbags on to a flatbed train wagon by the village railway crossing when your reporter spotted them.

The princes, dressed in waterproofs and wellingtons, formed part of a human chain with soldiers and railway workers hauling heavy sandbags out of the back of an army vehicle as part of an effort to repair an area where water was flowing beneath the railway track from the village golf course and threatening homes on the other side. Prince William dived into the back of the truck to help from there while Prince Harry stayed out in the rain and loaded up pallets alongside Miguel Head, William's private secretary.

Prince Harry helps load sandbags in Datchet. Photograph: Rob Booth

The princes did not seem entirely pleased to be spotted, perhaps especially not by a Republican-leaning newspaper. As the Guardian filmed his exertions, Harry called out: "You could come up here and help." William followed up with: "Why don't you put your notebook down and give us a hand with the sandbags?"

An attempt to take up the offer was scotched by the princes' minders, who made an odd excuse about your reporter – kitted out in wellies and waterproofs – wearing the wrong type of clothes.

Then after a briefing from the Network Rail man about the task in hand, they trooped off down the railway line, tried to repair the breach and trooped back about 40 minutes later looking tired and bedraggled before getting into a minibus which took them on to a nearby school where they helped build another sandbag wall, this time thronged by cameras and journalists.

The princes build a flood defence in Datchet. Photograph: Peter Macdiarmid/Getty Images

Kensington Palace declined to comment on the visit, insisting it was a private affair.

A royal source said: "The plan was to spend as long as they could without being happened upon. It was mainly for the guys to show support for their army colleagues and they wanted to do their bit for the relief effort."

Prince Harry remains a staff officer in the Household Cavalry, while Prince William left the armed forces in September last year after nearly eight years.

For the beleaguered residents of the area, late on Friday hoping the heavy rains would not bring back the worst of the flooding, it was just another strange episode in a surreal week. The princes were just the latest in a line of national figures to drop in on the stricken area, including the prime minister, David Cameron, the defence secretary, Philip Hammond, and the Labour leader, Ed Miliband. It did not go unnoticed in Datchet that the princes were the only ones to offer more than words and let their back muscles do the talking.