Will Smith still feels "emotional" about homelessness years after playing a destitute man in one of his most acclaimed film roles, the Hollywood star has told charity campaigners braving a fierce New York winter night to sleep rough.

Hundreds of people had gathered in Times Square on Saturday, rugged up and ready to bunk down in freezing temperatures, in a campaign to raise funds for what organizers said was record homelessness globally.

Smith told the crowd that his Oscar-nominated role in "The Pursuit of Happyness" -- a 2007 biopic of a salesman forced to live on the streets of San Francisco with his young son -- was a "life-changing experience" that had allowed him to understand the misery of poverty.

"It makes me emotional thinking about it right now," Smith said. "To not have a place to go and to be able to lay your head down with your children at night is a horrendous tragedy."

People in over 50 cities around the world slept on the streets to support the World's Big Sleep Out campaign
People in over 50 cities around the world slept on the streets to support the World's Big Sleep Out campaign AFP / Eduardo Munoz Alvarez

Smith also charmed crowds with a "bedtime story" -- a rap rendition of the theme tune to his 1990s hit sitcom "The Fresh Prince of Bel-Air."

People in over 50 cities around the world slept on the streets to support the World's Big Sleep Out campaign, the charity said in a Saturday statement, adding that funds from the New York event would be donated to the UN Children's Fund.

"In New York City alone, more people are now homeless than at any time since the Great Depression," the statement said.

"Over 62,000 people in New York, including 22,000 kids, will sleep in shelters tonight and the number of homeless people and refugees in cities around the world continues to hit record highs with each passing year."