On the morning after he had pulled off one of the most startling upsets in Maryland political history, Harry Roe Hughes again was trying to beat the odds. He was trying to get a few hours of sleep at his Baltimore town house. This time he lost.

The telephone rang in a nearby room at 9 a.m., only a few hours after Hughes had returned from his victory celebration at the Lord Baltimore. Then came the voice of his 22-year-old daughter. "Dad," she shouted. "It's the White House!"

Hughes, the freshly-minted Democratic nominee for governor of Maryland, stumbled out of bed and went to the phone. It was Vice President Walter Mondale. He congratulated the 51-year-old former state transportation secretary and offered to help in the fall campaign.

Mondale was but one of hundreds of callers, and scores of visitors, who found themselves yesterday offering congratulations to a man who only weeks ago was being labeled as a financially strapped, relatively unknown, organizationally-threadbare also-ran in the Democratic primary for governor.

Now, suddenly, he was being labeled as "the man who beat the machine," and also the candidate who somehow defied the state's traditional political wisdom that a politician without money and organization support simply cannot win. Hughes did win, and he won convincingly, defeating Acting Blair Lee III and Baltimore County Executive Theodore G. Venetouils.

Although Hughes and a few of his campaign workers said they were not surprised by the victory, they were virtually alone in that belief. On the Sunday before the election, a Baltimore Morning Sun poll showed Hughes trailing Lee by 14 points. Many political observers, particularly Venetoulis, thought the poll was overestimating Hughes' strength.

"A guy who sounded like a bookie called us about noon on election day and said: "You've got it. Don't ask me how, but you've got it," recalled Joseph Coale, Hughes' campaign manager. "That was enough for me."

The bookie apparently forgot to call J. Glenn Beall, the former U.S. senator who won the Republican nomination. Beall was sitting in his Cumberland insurance office at noon on election day talking as though the candidates and issues already had been decided.

The race, he said, would be between Beall and Lee. The issue would be Lee's politics-as-usual image versus Beall's promise to cleanse the state's corruption-riddled government. He predicted that enough disaffected Democrats - supporters of Venetoulis and Hughes - would shift to his side to make him the winner.

"We can't beat the Democrats when they're united," said Beall, who later that day would beat three GOP opponents by a better than 2-to-1 margin. "But Blair Lee will divide them. This year we will definitely have an opportunity again."

By the time Beall went to bed at the Baltimore Hilton that night, he knew as did everyone else that Harry Hughes, not Blair Lee, would be his opponent. His reaction to the upset was to hold fast to the strategy he had planned against Lee, with a slight twist. He said he would argue during the campaign that Hughes, as a party leader and cabinet officer during the era of rule by Gov. Marvin Mandel and Lee, offers only the illusion of change.

"The image is a little different," Beall said, comparing Hughes to Lee. "But the background is the same."

Hughes and his supporters were too busy enjoying their victory to consider what strategy will be used against Beall. They found enough to enjoy for several days. There was Hughes beating Venetoulis in Baltimore County by more than a 2 to 1 margin; Hughes trouncing Lee in the Baltimore City district of state Sen. Harry McGuirk, the politician who four months earlier had dismissed Hughes as a "lost ball in tall grass."

"I guess," said Hughes later, "our lawnmower was working pretty good."

Most political observers say that the lawnmower was in fact the influential Baltimore Sunpapers, which endorsed Hughes in a series of editorials that were unprecedented in their timing, stridency, and placement. The endorsements appeared three weeks before the election, and one of them, in The Evening Sun, was displayed on the front page.

Hughes said yesterday that the endorsements gave "objective substance" to his campaign, but that he had actually been picking up momentum since the first televised debate on August 1. It was at that debate that Hughes appeared calm and intelligent in the middle of a bitter cross-fire between Lee, Venetouils and the fourth candidate, Walter S. Orlinsky.

"The phone calls started coming in right after that debate," said Coale. "People stopped saying Harry was a good candidate who couldn't win and started saying they wanted to work for him." Still, the money was not coming in. Only during the last few days of the campaign could Hughes find enough money to return to television with a last-minute advertising blitz.

"The last Sun poll got us the money," said Michael Canning, Hughes' press aide. "We were all sitting around Richardson, Myers and Donofrio (Hughes' public relations firm) that night when the poll came out. As soon as we saw the results we sent messengers out all around the city and county to pick up checks. It brought in about $15,000."

Even with the last-minute advertising, Hughes was burdened with a relatively small volunteer network to get out his vote on election day. As it turned out, he did not need much.

The well-prepared Venetouils telephone canvassers discovered on election morning that when they were calling their "targeted" Venetoulis voters many of them were saying they had decided to vote for Hughes.

"We heard that Venetoulis stopped calling people, it was getting so bad for them. They were bringing out our vote."

Hughes was so relaxed on election day that he managed to take a nap an hour before the polls closed. His victory celebration later that night was in keeping with his style.

In the hour after the polls closed, the Lord Baltimore ballroom looked like a loser's burial ground. Less than 50 supporters, most of them elderly, milled around the cavernous room as an old-fashioned musical trio called Lee Roy and the Diplomat played such toe-tappers as "Shanty in Old Shantytown."

The celebration there was in marked contrast to what was going on downstairs at the victory party for attorney general candidate Steven Sachs. There, a hard-driving bass combo was belting out "Bad, Bad Leroy Brown" as young volunteers danced.

It was not until midnight that Hughes came down from his suite to officially pronounce himself the victor. He told the crowd that his upset showed Maryland voters were "Looking for something different."