A SENTIMENTAL, stay-together, pray-together prairie family led by a Norman Rockwell father with blow-dried hair and perfect teeth seems like a poor prospect for success in a society awash in hot tubs, wet T-shirts and the new, new morality.

It isn't.

The program is NBC's "Little House on the Prairie," and internal network documents recently obtained by Variety indicate that NBC earns $400,000 in profits from each new episode. Rerun rights presumably make the total much higher.

Comparisons are difficult because Variety's story is an unusual piercing of network silence on financial matters (NBC routinely denies the $400,000 figure and refuses further comment). But Variety reports that NBC makes more money on "Little House on the Prairie" than just about any other program on its 1979-'80 prime-time schedule.

"Little House" has been NBC's most consistent ratings hit since its premiere in 1974, and has flourished despite CBS and ABC opposition from superhits such as "Rhoda," and other shows -- "Young Daniel Boone" is the best example -- specificially designed to steal away its family audience.

On "Little House," a typical episode may involve unrequited puppy love, a friend unable to cope with his injured leg, or a gruff old mountain man who is mistaken for God. The climax nearly always borders on complete happiness for all concerned.

Although it finished the current season in 16th place, "Little House" lacks the urban audiences presumably needed for success. It receives an impressive 28.4 Nielsen rating in countries with less than 150,000 people, and a weak 16.4 in the nation's 25 largest metropolitan areas.

This is all the more unusual because loving, moral families die fast on prime-time television. The Ingalls of "Little House" and the fading Waltons -- they have lost most of their ordinal cast and finished this season in 43rd place -- are virtually the only noncomedic prime-time families around.

Next season promises to be no different. A study by the Dancer Fitzgerald Sample ad agency reveals that of approximately 100 new pilots ordered by the newworks, only two depict a traditional family in a nonhumorous setting. But neither ABC's suburban family in "American Dream," nor its lumbering industry clan "The Yeagers" has earned a firm spot in the fall lineup.

This overwhelming depiction of families in weird sexual, racial and marital combinations does not simply reflect today's soaring divorce rates. Nielsen figures indicate that dramatic shows about families rarely make the top-20 list. And when they do, as achieved by "Father Knows Best" in the 1950s and "Lassie" in the 1960s, they have the same rural setting and appeal found in "The Waltons" and "Little House on the Prairie."

"Little House" thus carries on an important tradition of somehow speaking for the heartland, for those who refuse to define success and virtue in urban terms.

But it has more than simple rural appeal, something that -- like most Hollywood successes -- evolved through a series of accidents.

In 1972, as part of television's move toward what network executives called "relevancy," NBC canceled long-time hit "Bonanza," which had featured Michael Landon as "Little Joe" Cartwright. Landon's career had included the title role in the 1957 feature film "I Was a Teenage Werewolf," but he decided to stay in television. He starred briefly on NBC's "Love Story," which died after only two months, and filled in for Johnny Carson on the "Tonight Show". During that period, Landon also signed a contract to do another series for NBC, but reportedly rejected several dozen program ideas.

In the meantime, CBS canceled "Laugh-In," freeing coproducer Ed Friendly to find another project. Friendly arrived home one day to discover his teen-age daughter reading "Little House on the Prairie." They're children's books, and I thought I had an idiot for a daughter," Friendly says. "But she told me that she reread them every year. So I decided to do a very difficult thing, to read a bunch of children's books. They were wonderful."

Friendly contacted Virginia lawyer Roger L. MacBridge, grandson of Laura Ingalls Wilder, the author of eight "Little House on the Prairie" books published in the 1930s and 1940s. MacBridge held the copyright, and had edited a ninth volume published after his grandmother's death.

According to MacBridge, Walt Disney had expressed interest during the early 1950s, "but his production people convinced him the books were too complicated to be made into a television series."

MacBridge liked Friendly. "He wanted to stick closely to the books," MacBride says. "Dinner with his family in Hollywood clinched the deal. They were people of integrity."

Friendly then hired an Emmy award-winning screenwriter to do a pilot, but says the writer "couldn't grasp the flavor of the books, and his work had to be thrown out."

In 1973, Friendly approached CBS with a finished script. "They had recently introduced 'The Waltons,' which was a surprise hit," he says. "But they said they didn't want any more rural, family shows. They didn't even want 'The Walton,' but were stuck with it."

Friendly had seen a "Bonanza" episode directed by Landon, and called to see if the actor would direct a "Little House" pilot should any network express interest. Landon then took the Laura Ingalls Wilder books home to his children, who loved them. So he announced that he'd like to play the father, and told NBC he'd found his vhicle. "I felt the time was right for the story of a close-knit family," Landon explains.

NBC bought the idea. "If Landon hadn't been connected with the project, they wouldn't have wanted it," Friendly says.

"Little House on the Prairie" premiered as a made-for-TV movie in early 1974, and was one of NBC's best-rated shows of the season.

Friendly and MacBride worked up nearly two dozen story idea for a series, but conflicts developed with Landon. "We wanted to follow the books more faithfully, and Landon said that it wouldn't reach the viewers he wanted and threatened to pull out," MacBride says. "The network sided with the star and that was that."

After intense negotiations, Landon assumed control. MacBride and Friendly dropped out, retaining part ownership in the television rights. Both say they admire what Landon has done with the program.

"There are still dynamic things in the books they're afraid to touch," Friendly adds. "And yet, our differences weren't that great. The biggest issue was that I wanted Mary to go blind at the end of the first year (she goes blind in the beginning of the fifth book). They eventually had her go blind in their third season and it was their highest-rated show to date."

Landon took over as executive producer, star, and sometimes director and writer. "Little House" thus became one man's personal statement, something rare in a creative process dominated by committee decision-making.

"Everyone in television doesn't have to follow the notion that dad is a clown or that every conversation must be funny, or that bickering has to happen all the time," he says. "Once in a while, it's nice for people to see that you can love each other and through that love become less likely to destroy yourself or the people you care about."

He believes that people learn from television. Back in "Bonanza" days, for example, he once went home with fake blood on his shirt and told his children that the plot called for him to be shot. "No, daddy," they said, "when they shoot you it's only a little hole."

A television musical in which someone playfully wrestled with a grizzly bear bothered Landon "because I knew kids would emulate it when they went to national parks. I wanted to show them you can't do that." So, "Little House" carried a brutal confrontation between Landon and a bear. The violence prompted criticism from NBC officials and numerous viewers, but Landon remains convinced he did the right thing.

Some also complained when Landon showed a long, drawn-out suicide attempt. "They were afraid it might encouraged somebody to commit suicide," he says. "I wanted to milk it to show people how painful suicide is." Landon got his way.

"He's probably the most extraordinary talent in the industry," says NBC vice president for drama programs Paul King, who examines all "Little House" episodes before broadcast. "This season, we had to discuss only one element in one story. Mike had an antagonist who terrorized the school for the blind, and he agreed to make it less dramatic."

Landon's own children have appeared on "Little House," as has the son of the late Dan Blocker, who played his brother on "Bonanza." More important, the conversations and experiences of the real Landon clan -- seven children and a wife of 18 years (he had been married previously for six) -- frequently pop up in scripts. Last season, Landon wrote 11 or 27 episodes, and next season he will write eight or nine.

"Religion evolved in my personal life over the years," Landon says, "and when one of my daughters had an accident and it was hit-or-miss for a long time, I found great comfort in faith." Prayer then became important on "Little House." "It's just something I've discovered about my nature," he says. "But it fits in well with the story because those were very religious times."

Landon himself had a Jewish father and a Catholic mother, and was raised Jewish. Depending on the marriage, his children have been raised Catholic, Protestant and Jewish. Here again, autobiography takes over Landon describes his parents as "a mixed marriage of height and religion," and the two-part episode which recently closed out the 1979-'80 "Little House" season depicted a short Jewish boy marrying a tall Christian girl.

(In the books, the Ingalls were also very religious. On Sundays, for example, the children could not "run or shout or be noisy in their play.")

Not all of the Ingalls' prayers are answered. Daughter Mary went permanently blind, and a helpless baby died in a fire. "I just started writing the script about the fire and it got sadder and sadder," Landon says. "I had no idea the baby would die until it happened. That was a two-hour episode and I thought we would lose the audience for the second hour. But the audience built up. I think it's because everyone has tragedy and they were happy to see that characters could suffer and get through."

Even in the face of such adversity, prayer always helps the Ingalls. This stands in sharp contrast to what columnist Dick Dabney called the current "media Theology," which permits few television characters to argue that "the Judeo-Christian faith rests on truth."

Under Landon's tutelage, "Little House" characters also make public policy statements inappropriate to the 1870s. Daughter Laura, for example, may look up from the campfire, cast a disdainful glance at the men and say something like, "No matter where you are, a woman's place is still in the kitchen."

Landon speaks enthusiastically about how his message reaches America. "One young boy wrote that he watched his father cry for the first time during one of our episodes," he says. "The boy had been afraid to cry in front of his father, but now he went over and hugged him." Landon pauses. "That gives me a good feeling."

Not everyone agrees that "Little House on the Prairie -- with its wise, strong father; pretty, well-scrubbed mother, and smiling thoughtful kids -- always has such positive effects.

The National PTA cites "Little House" as television's most commendable" show, and yet, it is ironical that the PTA recently initiated "Family Awareness" lessons "to show students the fallacies in television's protrayal of families."

"Portrayals of family life on TV give children a distorted view of what real family life should be like and cause them to make unfair comparisons with reality as they know it," the PTA notes. "This can create feelings of inferiority, insecurity, and frustration."

Dr. Dorothy Singer of Yale University says their Family Television Research and Consultation Center has an experimental school program which includes the lesson "that not all families are prefect." Dr. Singer praises "Little House," in comparison to most other television shows, but says that in the absence of discussions with a parents, even good television programming can cause "some children to worry, 'What's wrong with me?'"

Landon rejects this criticism and points to the fact that unlike other television fathers, Charles Ingalls has the respect of his wife and the ability to discipline his children.

Most experts prefer Landon's approach. "Fathers on most television shows are portrayed as incompetent and this has a tremendous negative effect on children," says psychiatrist Michael Rothenberg, author of many medical articles on television's impact on children. "Today's kids spend more time with these caricatured families then they do with their own. We know from child development that they learn by imitation and copying role models."

New Yorker telvision essayist Michael J. Arlen sees this as part of "the pendulum swing from pre-World War I reliance on authority to the current extreme of nonauthority, which television's depiction of weak males reflects."

Landon thinks it's too bad there aren't more families like the Ingalls. "But I can't fault anybody," he says. Then he steps away from his good-guy role. "If I were going to fault anybody, I would fault the public. If people wanted more shows with solid family life, the networks would provide them."