The migrating American, that restless animal historians say has shaped the American spirit since the first wagon rolled west, is moving in a new direction that raises profound questions for the nation's future.

For the past decade, according to U.S. Census figures, an increasing number of Americans have been migrating not to the nation's metropolitan areas but away from them, reversing patterns of growth underway since the industrial revolution.

Their destination, more often than not, is a small town or city in a remote area of the South, Southwest or West - often the very sort of environment from which their parents fled to the cities a generation before.

But while those earlier migrants were usually the poor and dispossessed of the Dust Bowl seeking work of any kind, today's migrants include not only students and retirees but a new group of relatively educated and affluent urban fugitives in search of something else.

Spiritual heirs of the pioneers who fled the sound of a neighbor's ax, they move seeking clear skies, clean streams and an uncrowded way of life. And like the pioneer, whose own ax rang in the virgin woods where he sought refuge, they are changing by their very arrival the environment they came to find.

Boom towns are sprouting in lethargic, backwater regions whose isolation, once a drawback, is now a lure. Growth-spawned problems of land speculation, strip development and rising taxes are plaguing small communities whose major worry a few years ago was not too many people but too few.

Reaction to those inevitable pressures is proliferating in such communities as Petaluma, Calif., whose no-growth policies threaten to impede what some historians consider the freedom most essential to the America experience - the freedom to move on.

"It may be," writes population expert Peter Morrison of the Rand Corp., "that the true safety valve for . . . discontented Eastern masses was not the free lands of the West but a kind of frontier of the mind - the image of an 'elsewhere' with its idealized of unhindered migratio." To restrict that vision, Morrison suggests, is to tamper with the essence of what we are as a nation. The Boise Boom

NOWHERE ARE the dynamics of the new migration more visible and dramatic than here in booming Boise (population: 150,000), the New Jerusalem for an influx of ex urban pilgrims, many seeking the California life style they feel California no longer provides.

Here on the Snake River Plain, hard by the granite peaks and crystal lakes of Idaho's savagely beautiful wilderness, they feel there's still a chance to do things right. Their bumper stickers shout the warning: "Don't Californicate Idaho!"

"I've seen it all happen on the coast," says Randall Morris, 30, a dentist who grew up in Los Angeles and now lives near here in Mountain Home. ". . . the trout streams dug up for freeways . . . the smog . . . the elk herd declining. It's the same old story of unplanned growth. It's happening here, but here there's still time."

The boom in Boise is merely the focal point of a statewide population explosion that has pushed once-somnolent Idaho into the nation's fourth fastest-growing state.

From 1960 to 1970, according to census figures, all but nine of Idaho's 44 counties were losing population. From 1970 to 1976, however, all but two gained population, in spite of a steadily declining national birth rate.

Boise itself, which loafed along at a 2 percent annual growth rate during the high-growth 1960s mushroomed 24 percent in the past six years alone, becoming one of the nation's fastest-growing metropolitan areas and perhaps the most vivid example of the new migration phenomenon.

"It's just like San Jose in the 1960s," says Rand's Morrison. While a few places in the country, like Ft. Lauderdale, Fla., are growing faster, "we know what's happening there . . . it was happening in the 1960s. But these growth areas in places like Idaho, the Ozarks and upper Michigan are something new - places which have never had much growth before and would not appear from their location to possess many of the prerequisites for urban greatness." Coming From California

FOUNDED IN 1863 as a cavalry fort during a gold rush to the nearby Boise Basin, Boise nearly lost its reason for being a few years later with the last of the gold.

The Oregon Trail passed nearby, but the city was snubbed by the railroad and slumbered in its sagebrush-covered foothills for nearly 30 years, a frontier town on the way to nowhere in particular.

The hatchet-shaped state of which it was capital stretched north to Canada in a network of emerald fir forests and snow-topped mountain ranges laced by the Continental Divide and by the sparkling white-water rivers that pour from its peaks. But its mountain passes were forbiddingly high and blocked by deep snow from November to June.

It was, in the words of the silver miners who lived in its remote and rarely accessible valleys, "a heaven of a place to live, but a hell of a place to make a living."

Boise itself sprawls at the foot of the Boise Range in Treasure Valley, an arid, dun-colored highland of mild winters and temperate Julys, where today Interstate 80 carries the progress that the railroad's absence so long delayed.

From the grounds of Maj. Pinckney Lugenbeel's original stockade, it stretches east and west along the knee-deep Boise River, its few blocks of Victorian buildings giving way to the ranch-style anonymity of the ubiquitous American subdivision and the roadside clutter of its commercial counterparts.

No one can precisely why or when the boom in Boise and other small cities began, but John Mitchell, an economics professor at Boise State University, says "It appears that around 1968 all of a sudden the things that Idaho had - the wildness, the wilderness and the mountains - began to be valued elsewhere." And elsewhere, other things were happening.

Howard Bradley, then 32, was riding his motorcycle near his home in Berkeley, Calif., that year when smelled what he thought was the scent of flowers. When the smell persisted for several blocks, however, he realized it wasn't flowers at all: It was tear gas drifting off the nearby University of California campus from yet another riot of the turbulent 1960s.

"That did it," he recalled the other day in his office in Boise. Long disenchanted with the increasing crime, "bizarre" politics and generally deteriorating quality of urban life in general and Berkeley's in particular, Brandley and his wife had talked of moving to some area in the West more remote from people and the pressures they bring with them.

"The day I could no longer tell tear gas from flowers," Bradley remembers, "I knew it was time to leave."

The first step, he decided, was to acquire a transferable skill which might be in demand in a less urban area. Since he was a pilot and "pretty good with my hands," he left his job as a laboratory reseach technician, moved to Los Angeles and worked two years for Northrop Aviation to become an aviation mechanic. Then he and his wife loaded "the tent and the sleeping bags and a few other things" into their small plane and took off for the Pacific Northwest, not knowing where they would land.

"It was not a good time," he remembers. "The country was deep in recession and the layoffs at Boeing in Seattle has sent a flood of aviation technicians into the Northwest. We looked over Montana but that didn't look too good. We had a friend here in Boise so we decided this looked like a good place to start."

While Boise itself "doesn't have much personality as a city," and was already somewhat larger than they had hoped for, they discovered it offered many of the amenities they had left Berkeley to find. It had both an "appealing social stability and a college where they could continue their education.

Less than an hour away were mountains to climb and rivers to run and wilderness areas to backpack and camp in.An hour after work they could be skimming down one of 37 slopes at Bogus Basin, a community-run jewel of a ski area in the mountains overlookiing the city.

"In California we had regularly driven four and five hours to Yosemite on weekends," Bradley remembers. "I never really minded the drive, but here all this was at our door."

So the Bradleys moved to Boise without even a job.

"The sacrifices at first were severe," Bradley remembers. "Even when we finally did get work we were bringing home at least 60 to 75 percent less than we'd been making in Berkeley. And Boise is not that cheap place to live."

But his wife, a criminologist, found work in the state crime lab and Bradley moved from airplane engines into helicopter transmissions, formed one partnership, sold out and today a runs his own company repairing precision tools. The Importance of Environment

IF THE BRADLEYS are one of the more dramatic examples of in-migration to Boise, they are far from uique. A 1975 study of some 1,500 new families in the Boise area, conducted by economist Mitchell and the Boise Center for Urban Research found that 25 percent of those moving into Boise from out of state from California - the largest percentage from any other state. Many, like Randall Morris, are the children or grandchildren of Idaho pioneers who followed the California dream westward in the 1930s to see that dream sour in a fouled nest of overbuilt subdivisions and freeways. Drawn by a combination of clean air and nostalgia, the children have retraced the journey.

Mitchell's study showed that more than 32 percent of those moving into the Boise area, like Bradley, had no job when they came, and 23 percent said they moved here "to enjoy the benefits of a smaller metropolitan area." Fully 44 percent - the largest single category in the sample - said they moved to Boise "to live Idabo's environment."

The importance of Idabo's environment is hard to overemphasize. It dominates almost every discussion of why people move to the state. Gary Watson, managing editor of Boise's newspaper, The Idaho Statesman, says it affects not only the quality of his job applicants but their attitude once hired.

"This is a good little newspaper and we're proud of if but it's not The New York Times," he said. "Yet we're getting really fine people - guys in their 30s who've worked overseas with Newsweek or somewhere with The Wall Street Journal who want to come out here and work as reporters. These are people at the peak of their profession who've decided there is more life than just a job. And for many of them a lot of those things are here."

Watson said newspeople on his staff, given the choice between taking overtime pay or extra time off, almost invariably insist on taking the extra time - "to go backpacking or skiing or something." At any other newspaper where he's worked, he said money was always king. Jobs Follow People

THERE IS MORE to the Boise boom than outdoor sports, however, as economist Mitchell is quick to point out. Despite its out-of-the way location, Boise has a number of economically stimulating factors, including unusually good air service for a city its size and the corporate headquarters of such business giants as Boise-Cascade and Morrison Knudson, the world's largest engineering firm.

Several factors, he says, combined to help the city over the 100,000 population mark, which he describes as "a threshold beyond which growth to some extent becomes self-sustaining."

One factor was the nation's general population shift to the West, which gradually has made it more and more practical for industries to locate a factory or a division or even a corporate headquarters west of the Rockies.

Another was the rapid growth in state government and of Boise State University, which ballooned in the 1970s from a two-year community college to a university of some 15,000 students.

A third included such intangibles as the interstate highway system, improved air service and television, which reduced the sense of isolation associated with many small towns and cities in previous decades.

But once a city hits the 100,000 mark, he says, a number of other growth spurs kick in automatically:

Restaurants and chain stores begin to look at the city as a suitable location for a branch or a franchise.

Businesses like insurance companies, which have serviced the area with a traveling representative located somewhere else, start thinking about opening a branch office.

Service industries in general, from boutiques to bowling alleys, proliferate to serve the population, triggering in turn more industries with more jobs to attract more people.

But environmental considerations and job opportunities often go hand in hand. Ray Smelek, 43, plant manager for the Hewlett-Packard Co., started a new division in Boise four years ago and now has some 750 people employed in the area making computer printers and memory discs. The decision to locate in Boise, he says, was prompted largely by three factors. One was overcrowding in the company's main base near San Jose, Calif. Another was the high productivity of the labor force in Idaho. The third was the environment around Boise.

"We're a company whose profitability depends to a great extent on attracting young engineers right out of college," Smelek says, "young people withe bright ideas. We need them. Companies like ours discovered about 1970 that those kids don't want to locate in a city. They want a place where they can get out into the mountains and the wilderness areas and leave their work behind."

Hewlett-Packard began experimenting, locating plants in places like Loveland, Colo., and Colorado Springs and was "very pleased with the results . . it's more and more the trend."

The Boise area, he remarks, is so popular that Hewlett-Packard attracts soem 75 percent of all young engineers to whom it offers positions at the plant here. Most plants or companies, he says, are very happy with a "hit rate" of 50 percent. Wanting To Be "The Last One In"

THE PORTRAITS of Boise's in-migrants as painted by people like Smelek, Watson and Mitchell coincide almost exactly with the characteristics of the new migrants nationwide sketched by demographers like Morrison at Rand. They are, in Mitchell's words, a "new educated elite who can afford the luxury of choice."

They are people like Bob Dews, 36, who decided to leave Washington State for Idaho "the day I was backpacking in the Cascades and 30 people passed my tent after I'd pitched camp." Or Renee Winn, a Pittsburgh-raised travel agent in her 30s from Burley, Idaho, for whom "the whole point in being out here is to load the kids in the camper, get up in the mountains and sit under a tree with a six-pack and drink and think."

"When I'm out camped in the wilderness at the end of the day," says Randall Morris, the Mountain Home dentist, "sitting by the fire watching the sunset and stirring my coffee, I say a littler prayer - this is really true - I say a prayer for all those poor bastards in New York City."

But environmental satisfaction, as the new migrants ruefully acknowledge, is a fragile thing. While migrants who flock to cities for the advantages fo "bigness" enhance that bigness, those who move to places like Boise for smallness help destroy, with each arrival, the qualities they came to find.

Already the debate over growth is raging in Boise, where morning traffic jams are being born and pollution taints the downtown air. "Shhhh! Idaho!" say the bumper stickers on the new migrants' cars.

Yet to keep Idaho as it is to resist growth; to resist growth, in this era of fallling birth rates, is to resist migration. And to resist migration is to raise such patently unconstitutional questions as "Who will be allowed to live where?" Or, perhaps more important, "Who will decide and by what criteria?"

Howard Bradley, for one, is already uneasy.

"You know, " he says, "These's a particular place when you're driving west on Fairfield Avenue and where you look in the rear view mirror and see the miles of houses and the signs of the fast food joints and the used car dealers and the mountains in the sunlight above them. Ther's a spooky sense of deja vu about it. It looks exactly like the San Fernando Valley in the 1950s."

He's been thinking lately, he says, of packing his plane once more and moving on somewhere else. "It's an old story," he says. "Everybody wants to be the last one in."