Nine years ago, before he had reason to wonder, Sen. Gaylord Nelson (D-Wis.) published a book of letters from children under a captivating title: "What Are Me and You Gonna Do?"

That theme could now easily apply to Nelson, his staff and hundreds of other Democratic employes in Congress swept from their jobs by Tuesday's election.

With 16 new Republicans entering the Senate, 52 new Republicans in the House and a new GOP administration downtown, this is not what you would call a boom time for Democratic job-seekers.

That much is certain. What is less clear, with many Democratic offices still in shock from the house cleaning, is what will happen to all those suddenly displaced and, in many cases, extremely talented staff people.

"This is the second time it's happened to me," said Dorothy Pastis, a receptionist for Sen. Robert Morgan (D-N.C.), who lost in an upset Tuesday. "What we all should understand is that this is a ball game -- some days you win and some days you don't."

Pastis, from Wilmington, N.C., walked into his office of former senator Everett Jordan in 1972 and was hired on the spot. He lost shortly after that and she was out of a job. She was rehired later by Morgan.

"I've told the younger people not to stay with one senator so long. When their senator loses, they find their ideas have become tainted and they have become independent. It's a very strange place," she said.

Dorothy Pastis is right. Senior legislators with rank build up aggregations of faithful and dependable aides who tend their offices and handle their committee business. They also become, in a sense, dependents, their fates intertwined with their patrons'.

The brighter and more ambitious use those congressional jobs to move up in government on their own -- or with an influential push. Federal Communications Commission Chairman Charles D. Ferris, Federal Energy Regulatory Commission Chairman Charles B. Curtis and Federal Trade Commission Chairman Michael Pertschuk are recent graduates of the congressional training school. All three will continue as federal commissioners, but will lose their special positions as chairmen.

Many of the skilled professional staffers made jobless by Tuesday's election will land on their feet, either staying on Capitol Hill or going elsewhere (though their task will be harder because the executive branch as well as the Senate is now in the hands of the opposite party).

But there are hundreds more, working at lower congressional levels, who today are asking the question posed by Gaylord Nelson in his little book of children's mail.

Kathy Snyder, 27, who used to help Nelson answer letters from kids, is one of those. "Everybody here has the fear that they won't have a place to go. Many of us don't want to work for this new administration. I don't. I'm going back to Wisconsin to teach," she said.

Sheldon Grosberg, head of the congressional placement service, noted that it may be a little tougher than usual to match people with jobs -- conservative Republicans may have little desire to hire the old staffers of the expelled moderate-to-liberal Democrats.

"We have no idea of the numbers of job-seekers yet," Grosberg said, "but we already have a large number of people coming in looking for jobs, both from the Hill and off the street. Normally at this time of year a lot of people are out of congressional jobs, but this time it's extraordinary."

To help the suddenly uprooted typists, clerial workers, case workers, researchers and other foot soldiers in the legislative army, Grosberg is planning to hold more of the job-search seminars he began earlier this year for displaced persons.

One who might turn to Grosberg for help is Irene Winter, who has spent the last 26 years of her life in the office of Sen. Warren G. Magnuson (D-Wash.), another loser Tuesday. As his personal secretary and office manager, she is one of the scores of people who found a place on a Senate payroll over the years through Magnuson's hiring power as a senior member and committee chairman.

"I plan to work on the Hill a couple more years because I want to qualify for the congressional retirement," she said. "I don't expect to find a job as grand as the one I have now, but I don't feel a sense of anxiety that many others feel right now."

"My goal is to close his office with the same class that Sen. Magnuson operated with over the years," she said. "I'm just sorry . . . the people in Washington state don't know what they've done."

After the Senate committees are reorganized in January, with Republicans in charge, many of the staffers who became more expert than their Democratic bosses will be out in the cold.

"Until the subcommittees are organized, we won't know anything about staff or what is going to happen to the professional corps around here," said David Gwaltney, who works for the energy and water resources subcommittee fo Appropriations. "Obviously, a lot of people won't be around. We're out of the mainstream now."

Another category of jobless Capitol Hill staffers includes the people who work for a Republican who lost last Tuesday. They will be coveted by the newcomers and doors will swing open for them in the Reagan administration in happy ways.

"As of Jan. 3, we're gone," said James O'Connell, a top assistant to Sen. Jacob K. Javits (R-N.Y.), who lost a GOP primary and then lost again Tuesday as a liberal candidate. "But we work for a senator with a very fine reputation and that has to help."