Federal and state officials, moving with unaccustomed speed, began distributing thousands of pounds of free cheese today less than 24 hours after President Reagan unlocked a huge government stockpile.

"It's great," said Paul Diederich of the Salvation Army division headquarters here. "We need all the help we can get."

Trucks loaded with the five-pound bricks of processed American cheese began moving toward southern California from northern California where most of the 10 warehouses holding the 25 million pounds of surplus cheese in the state are located.

The quick action in California is expected to be the first of the effort to distribute to the poor some of the more than 560 million pounds of surplus cheese now in warehouses throughout the country.

A series of press conferences, demonstrations and appeals to the president by lawyers for the poor and even some grocer and dairy associations in California brought the early release here.

Jessie Orta of the state's intercity food task force said a telegram from the U.S. Agriculture Department this morning freed an initial 168,000 pounds of cheese held at U.S. Cold Storage, a Sacramento warehouse. Trucks loaned by the Camblin Steel Services Inc. picked up the cheese and took it to the main Sacramento distribution point, the Senior Gleaners warehouse.

Senior Gleaners is an organization of retired residents who go to orchards and fruit-growing areas, take what the pickers miss and distribute it to charities.

James Magel, president of Senior Gleaners, said his organization would be distributing the cheese today to local charities and that trucks from charity-run food banks from all over northern California were already on their way.

An attorney with Public Advocates, a San Francisco law firm that pressed for releasing the cheese, attributed the quick action to the enormous national surplus, the Christmas season and the interest taken by the president after USDA officials seemed to be dragging their feet.

"We had a tremendous amount of cheese, and they were saying they might even throw it into the ocean," said Lois Salisbury, noting that publicity about the surplus helped stimulate public efforts to get a quick release to the poor.

The huge surplus has accumulated as the result of the federal dairy price support program under which the government buys cheese and other products to keep the price from falling and hurting the economy of dairy industry areas.

The system has tended to encourage farmers to produce surpluses, however, and some of the cheese has been held so long it has begun to spoil, federal officials have said.

The president in his order Tuesday directed the release of only three million pounds of processed cheese in California, but Salisbury said her conversations with Agriculture Department officials indicated that it would be possible soon to release much of the rest of the surplus, most of it natural cheddar cheese.

In Sacramento, Senior Gleaners president Magel said, "We're very grateful that we're going to get it, but I think the government's going to get bit for doing it . . . there's going to be a backlash from a lot of senior citizens who wonder why the government's doing it all of a sudden rather than right along when they needed it."