The National Museum of American Art is trying to track down the museum pieces it has lent through the years to other government agencies. And what the museum has discovered is a bit embarrassing.

Some of the museum's pieces are missing. And other pieces have turned up in unusual places.

For example, Sheila Gottesman, who was hired by the museum 14 months ago to find and count the loaned artworks, has:

* Rescued an oil painting by a well-known American artist from a restroom in a government office building.

* Discovered a famous sculpture on top of an abandoned refrigerator in the basement of a government storeroom.

* Found several valuable watercolor paintings in the attic of another federal office building, stacked next to old furniture and typewriters.

Museum registrar Robert Johnston said no one is quite sure how many pieces of art have been lent to federal agencies, the Supreme Court and the White House since 1936, when the museum first began lending because it did not have enough display space.

The museum has 25,546 pieces of art listed in its collection. Officials believe about 1,100 artworks were loaned to other agencies, but until the museum's entire collection is counted, Johnston said, it will be impossible to tell what is missing.

So far, Gottesman has discovered 985 pieces of loaned art. About 750 of those have been returned to the museum. She is still looking for about 100 pieces, which may be lost at some federal agency, misplaced in the museum's storerooms or stolen.

The inventory is part of an ambitious project by the Smithsonian Institution to count the estimated 78 million artifacts and specimens in its nine museums.

Johnston said Gottesman was hired after museum officials discovered the poor condition of its loan records. Before 1968, many of these were handwritten notes. Some simply said that a Cabinet member or Cabinet spouse had dropped by to pick out a painting.

"Finding the art was difficult because officials would borrow a museum piece and then take it with them when they moved to a different office or different agency," said Gottesman, who has college degrees in art and museum curating. "Other times someone would move into an office and not like the piece of art so they would put it in a closet or send it to storage."

She decided the only way to find the art was to search for it herself. Since last spring, Gottesman said, she has walked through at least every department, examining offices, closets and cubbyholes, climbing through attics and basements.

Only the president, vice president, the president's Cabinet, congressional leaders, Supreme Court justices, U.S. ambassadors and government officials who are members of the Smithsonian Board of Regents can borrow artworks now, under guidelines adopted by the museum last year. Each borrower is limited to three pieces and can choose only artwork that is not on exhibit.

The Reagan White House has not requested any museum pieces, Johnston said. Several Cabinet members have borrowed paintings, but not as many as previous cabinets did.

Gottesman finished her last tour of a federal agency last week. At the end of the month, her museum job will be over.