UK Sport will receive £500m over the next four years to maintain funding for Olympic sports at same level before the 2016 Games as during the runup to London, David Cameron has announced.

The prime minister also used the closing day of the London Olympics to reveal he has appointed Lord Coe as his Olympic legacy adviser.

Coe, chair of the London 2012 Olympic organising committee who first led the successful bid for the London Games, will spearhead an Olympics Legacy unit in the Cabinet Office to secure the long-term benefits of hosting the Games, focusing particularly on economic and business gains.

The prime minister outlined the moves as part of government plans to build on the legacy of the Olympics for Britain.

Speaking on BBC News on Sunday, Cameron said the decision to provide £125m every year until 2016 aimed "to reward the success of the UK's outstanding elite sport system" following the British team's record-breaking medal success at the London Games.

"The motto of these Games has been 'inspire a generation'. Nothing has been more inspirational than seeing our elite athletes win gold this summer," he said.

"There's a direct link between elite success and participation in sport. I want one of the legacies of these Games to be our athletes triumphing in Rio in 2016, and in future Olympic Games. Guaranteeing this funding will help ensure that happens."

UK Sport, the body that distributes cash to Olympic and Paralympic sports as well as providing a number of specialist services, had previously only been guaranteed funding up until 2014.

The lion's share of the money will come from the national lottery, with Treasury funding of £40m a year committed for the next two years.

A Downing Street statement said: "As an exception, exchequer funding is now being committed to 2016/17, to give athletes financial certainty in the crucial final two years in the runup to Rio 2016."

The government hopes that this, together with an estimated £87m of lottery funding a year, will help athletes such as cyclist Laura Trott and Jonnie Peacock in the Paralympic squad to be able to train full time in their sports.

In exchange for the funding, the government wants to keep alive the momentum of the volunteering spirit of the Games by requesting that funded athletes give up five days a year to inspire future generations through school sport.

Cameron said he was also determined to deliver "the best legacy ever" for Britain across the economy, volunteering and regeneration as he announced Coe was to continue his involvement with the Olympics beyond Sunday's closing ceremony by serving as the government's "legacy ambassador".

The Tory peer and former MP, whose role in making the Games a success has been widely acclaimed, will advise the prime minister on how best to make the most of this success in reaching the government's target of £13bn in economic benefits as a result of hosting the Games.

He will also act as a "roving global ambassador" to help win new trade and investment deals for British businesses.

"Seb Coe has done a brilliant job delivering the best Games ever," said Cameron. "Now I want him to help me deliver the best Olympic legacy ever."

The prime minister suggested the "massive self-confidence boost" enjoyed by the UK as a result of the Olympics could help drag the country out of economic trouble.

"It is an enormous confidence-booster about who we are as a country, what we can do, what we stand for, and the fact that we can make our way in a very tough and competitive world," he told BBC News.

"We do face a very tough economic situation and I do not belittle that at all. It is a very tough economic world that we are in. But in a way what these Games show is that if you work hard enough at something, if you plan something, if you are passionate enough about something, you can turn things around. I think that is the lesson people can take from these Games."

But the Conservative London mayor, Boris Johnson, suggested inspiration alone would not be enough to boost growth as he urged the government to seize on the success of the Games by embarking on a radical programme to get the economy back on its feet.

Johnson, riding high after a fortnight acting as the political face of the Games, told the Sunday Telegraph ministers "need to go further" by taking bold steps in removing barriers to economic growth.

This included making it easier to hire and fire staff, acting on his calls for a new airport on the Thames estuary, investing in a number of infrastructure transport projects in the capital, and streamlining planning laws to pave the way for a housing boom.

"The most important thing about the Olympics is that they have shown that Britain really can do things," said Johnson. "We have shown the world we are a happy, ambitious, modern, successful economy.

"We have shown incredible logistical skills. We now have every reason to be in confident in ourselves and the future."