Agriculture Secretary Bob Bergland has been boasting these days. He ought to. He runs one of the few government programs that may be working better than its architects expected or hoped.

Bergland's pride is his grain reserve program, and the way it has softened the impact of increased grain exports on U.S. food markets. A large part of the higher exports will go to the Soviet Union, which, according to the latest Agriculture Department estimates, may suffer a one-fifth decline in its crop this year. Soviet grain imports may double and, with two-thirds of the supply coming from the United States, increases mean less secondary impact on meat production and retail prices. Feed grains constitute a basic cost in raising hogs, poultry American exports could rise 20 percent.

The most remarkable thing about these prospective purchases is that, outside of farm circles, no one has much noticed. "Our farmer-owned reserve has done what we said it would," Bergland tells audiences. When grain supplies were ample and prices low, the government paid farmers to take their grain off the market, preventing prices from dropping still further. Now, with the demand higher, the program pushes some of that grain back onto the market, cushioning the price increases.

In turn, more modest grain price and beef. Higher grain costs depress meat production until retail prices rise sufficiently to restore profitability.

All of this underlines a central problem of U.S. agriculture: its enormous dependence on foreign markets. About 60 percent of the U.S. wheat crop goes overseas, as does 30 percent of the corn. Foreigners see us controlling their fate, but the converse is also true. With the United States supplying more than half the world's grain exports, and significant fluctuation in supply or demand affects the American market disproportionately and can have a monumental impact on farmers' incomes and on retail prices.

We learned just how monumental in the early 1970s. Until then, the world seemed to have too much grain. To reduce surpluses, the U.S. and other producers subsidized export sales. Heavily influenced by government support prices - the level at which the government would take excess grain - prices were relatively stable.

What happened at the beginning of the decade was a quantum jump in exports, reflecting both the Soviet Union's decision to buy on world markets (so that it could provide more meat) and a steadily rising demand from Europe, Japan and advanced developing countries.

The experience of those years reimpressed farmers and their bureaucratic overlords with the havoc latent in wide fluctuations in foreign demand. The combination of surprise Soviet purchases in 1972-73 and a poor U.S. corn crop in 1974 proved explosive.

Initially, high feed-grain costs crippled meat production. Pork supplies declined especially sharply; last year, supplies were still below the 1972 level. In beef, the industry had built a large herd on the expectation of continued low grain prices and high retail prices. The collapse of that assumption induced a large sell-off of cattle is ending, reduced supplies have driven meat prices dramatically higher.

Even the grain farmers suffered. The initial spurt of foreign demand and higher prices led to a huge increase in production. Many farmers borrowed to buy new machinery and land at inflated prices. When grain prices subsequently slumped - by 1977, average wheat prices had dropped about half their 1974 level and corn was down about one-third - these operators got squeezed. Many of them came to Washington in the tractorcades of 1978 and 1979.

The idea of moderating this boom-bust cycle by taking train into reserves during good years and spilling it out during bad years is so simple that it is not, of course, original with Bergland. But, in the past, the twin villains of human greed and human fallibility doomed this approach.

Bureaucrats can't outguess Mother Nature; therefore, they have a difficult time figuring out how much grain to take into the reserve. As for greed, the farmers' self-interest is to push the support prices as high as possible. If it's set too high, too much grain gets produced. The reserves then become massive surplus stocks that are enormously expensive for taxpayers and overhand grain markets, threatening to depress prices.

Has Bergland suddenly found a secret way of eliminating these problems? Not really. Indeed, as late as five or six months ago, respected agriculture economists believed the government risked accumulating large stocks. Last year, the administration reinstituted "set aside" programs to take acreage out of production.

At one level, Bergland may simply have been saved by good luck; the bad harvest in the Soviet Union. The huge purchase will cause the reduction of existing stocks and - six months after the last tractorcade - will probably mean the most profitable year for American farmers since at least 1975. Corn and wheat prices are up about 30 per cent from a year ago. That's significant, but must be considered in the context of highly volatile agriculture prices that can easily move 10 or 15 per cent in a few weeks. It's nothing like the 200 and 300 percent increases of the mid-1970s.

If the Soviet harvest deteriorates no further and the American corn crop doesn't encounter bad weather, Bergland can probably be content that the significant rise in farm income will have only a moderate impact on pork and poultry prices toward the end of 1980. Eliminating "set aside" for next year's crop will tend to increase grain supplies. Fluctuations in farmer income and retail prices won't have been eliminated, but - as planned - smoothed.

Perhaps it is unkind and too simplistic to attribute all this to Bergland's good luck. Outside the United States, the world's taste for meat - and, therefore, grain - seems to have increased slightly faster than its sustained capacity to produce. This may be temporary; new areas can come into production. But it's arguable that long-term supply and demand are now much closer in balance. Good and bad years may offset each other more regularly, and managing national grain reserves may not be so difficult after all. CAPTION: Picture, BOB BERGLAND...reason to boast