John Legend has revealed he was behind a $5,000 (£3,900) mystery donation to help alleviate debt amassed by children unable to pay for school lunches in the US.

The 10-time Grammy award winner replied to a message of appreciation on Twitter on Monday with a call for free lunches for all public school pupils.

The mystery started after Jeff Lew, a parent from Seattle, Washington, set up a GoFundMe online fundraiser to pay off the city’s meal debts.

After noticing an extraordinarily large donation came from a man named John Stephens, he performed an online search and discovered it was the star’s real name.

According to the Seattle Times, Mr Lew said he sent a message through the website, asking: “By the way, are you also known as John Legend? Regardless of who you are or not, thank you. You’ve helped a lot.”

He received a reply with the subject line “yes, it’s me”, the newspaper said.

Mr Lew went on to tweet the star to publicly thank him.

Legend, 38, replied: “My pleasure! We should have free lunch for all of our public students!”

John Legend fund raiser
The musician recently plaid piano for commuters and London’s St Pancras (Lauren Hurley/PA)

The fundraiser has gone on to amass more than $36,000 (£28,000), more than enough to pay off the $21,000 (£16,400) Mr Lew said was owed by the city’s 99 schools.

A survey last year by the School Nutrition Association, a non-profit organisation, found 76% of US school districts reported students owing money to their meal programmes.

There have been reports of children experiencing “lunch shaming” where their meals have been thrown away or they have been offered a sandwich instead of a hot meal like other pupils.

Those from the poorest families are entitled to free or reduced-price lunches and breakfasts.

But some find hardship paying the reduced rates while others fail to fill out paperwork giving their children entitlement to free meals.