With the electorate sharply polarized along party lines, Maryland Gov. Harry Hughes and U.S. Sen. Paul Sarbanes, both Democrats, hold substantial leads over Republican challengers as they head toward the Nov. 2 general election, according to a Washington Post poll.

The poll, conducted from Oct. 7 through 10 among 609 registered voters, shows Hughes and Sarbanes leading handily among nearly all categories of voters except for Republicans, who make up only one-fourth of the electorate, and those who consider themselves strong supporters of President Reagan.

The two Democrats dominate among all income and age groups, women, government workers and independent voters. The GOP nominees--gubernatorial candidate Robert A. Pascal and Senate contender Lawrence J. Hogan--are trailing even among voters who say they "approve somewhat" of the way President Reagan is handling his job.

In the governor's race, Hughes leads Pascal by a lopsided margin of 62 percent to 27 percent with 11 percent of the likely voters polled undecided. Even in Anne Arundel County, where Pascal is completing a second term as county executive, voters appear to prefer Hughes.

Among voters interviewed after the poll about why they favored Hughes, the responses included that they like his personality, think he is honest, has done a good job for four years and is careful with the state's finances.

In the Senate race, Sarbanes topped Hogan 55 percent to 30 percent, with 15 percent undecided. Top GOP strategists began to focus on Sarbanes more than a year ago, believing him to be one of the Democratic Party's more vulnerable incumbents in this election. But The Post poll shows Sarbanes now dominating even in Prince George's County, which Hogan represented in Congress and where he is just finishing a four-year term as county executive.

When asked why they were supporting Sarbanes, responses included that he displays "human values" and that he is "trying to help Maryland get jobs and get back a good economy."

Among all four candidates, Hughes also had the highest approval rating -- 58 percent said they had a favorable impression of him -- and was known by most voters. Only 23 percent dislike Hughes.

Sarbanes was viewed positively by 48 percent of those surveyed, a rating that was similar to Maryland's other U.S. senator, Republican Charles McC. Mathias, and President Reagan. About 27 percent said they did not like Sarbanes.

Pascal, who has been plagued with money troubles throughout his campaign, is still unknown to nearly half of the voters. Of those polled, 27 percent liked him, 17 percent did not, and a plurality -- 44 percent -- said they couldn't rate him. Pascal is hoping a blast of commercials during the next two weeks will help spread his name among voters.

Hogan has suffered from a similar lack of funds and only 47 percent of the electorate knew enough to venture an opinion of him. The combative Hogan also appears to be suffering from a sharply divided impression among the voters: 25 percent of those polled have a favorable view of him, and almost the same number, 22 percent, dislike him.

The poll's findings suggest that a controversial media effort against Sarbanes by the National Conservative Political Action Committee (NCPAC) has been largely unsuccessful. In the poll, only 9 percent said they approved of NCPAC's advertisements and 24 percent said they disapproved. Another 43 percent said they had not seen any of the commercials. NCPAC has spent $625,000 in the last 18 months for commercials that portray Sarbanes as "too liberal for Maryland." NCPAC's current ads attack Sarbanes for votes the group says show support for school busing for integration.

Several voters interviewed after the poll said they found the NCPAC ads offensive and out of step with Maryland. "I think their tactics are ridiculous," said Bette Lewis, an Anne Arundel Republican who thinks Sarbanes is "extremely liberal" and will vote her party ticket in November. "They're not fighting fair. It think it's trite to pick on Sarbanes' personality. And busing is not an issue in Maryland anymore."

The poll results also show that Maryland's overwhelmingly Democratic electorate continues to oppose Reagan administration economic policies. Those who opposed Reagan in 1980 (Maryland was one of only six states that Jimmy Carter won) today reject both GOP moderate and conservative candidates. Pascal, who has cultivated a moderate image and distanced himself from Reagan, was received no more warmly by the voters than the conservative Hogan.

The Post's results are similar to polls this year in other states where many Democrats, blaming the Republicans for a variety of economic woes, are remaining loyal to their party.

Commodore Green, a retired bricklayer and Washington County Democrat, said he intends to vote for both Hughes and Sarbanes in part because of his dissatisfaction with the Reagan administration. "A lot of people feel that way," said Green, who voted for Reagan in 1980. "He takes too much off the little guys but not enough off the big guys."

Green, like many others interviewed, said he did not know much about either Pascal or Hogan. "I'm leaning toward Hughes because I just don't know the other guy too well. I like Sarbanes better than I do what's-his-name."

A 23-year-old Baltimore housewife, who is a Democrat, voiced similar sentiments in explaining why she intended to vote for Hughes and Sarbanes, neither of whom she knew much about. "It has more to do with the way Reagan is going about his policies; it's more than that he is just a Republican," she said.

Among those surveyed by The Post poll, 53 percent said they were either "not very confident" or "not confident at all" that Reagan's policies will improve the economy. Only 30 percent said they thought the economy is getting better under Reagan, with 48 percent saying it is getting worse.

Other findings in the poll--along with the electorate's solid support for Democratic incumbents and the overwhelming disapproval of Reagan's economic policies--reinforce Maryland's reputation as an increasingly liberal state.

Although historically Democratic voters, who have a 2-to-1 registration edge, are more likely to vote across party lines, the reverse appears to be true in Maryland this year. Sarbanes, for example, whom the electorate perceives as the most liberal of the four candidates, was running almost even with Hogan among voters who described themselves as conservatives. Independent voters, who represent roughly one-fifth of the electorate, support Hughes over Pascal by a 65-to-20 margin, and support Sarbanes over Hogan by a 47-to-34 margin.

More than half of the voters, in keeping with the poll's other findings, said they believed the Democratic Party would help make things better in the U.S., and more than a third said the Republican Party would make things worse. Voters surveyed appeared to support the nuclear freeze movement, the black civil rights movement, and the women's movement.

Polling assistant Kenneth P. John also contributed to this story.