The strangest Maryland election campaign in years enters its final hours today with a focus on the troubles of three prominent incumbents, including President Carter, who were once the acknowledged favorites in the state.

Carter is still considered likely to win the state's 10 traditionally Democratic electoral votes, if only because of the 3-to-1 edge in party registration Democrats hold over Republicans. But Ronald Reagan's campaign, encouraged by a poll that showed the Republican trailing by only four points late last week, has launched a last-minute local media campaign, and GOP stategists are arguing that a national shift in momentum toward Reagan could lead to an upset in Maryland.

Even with the presidential race narrowing, however, political attention in the state has been distracted by the sudden calamities that have struck two popular members of Congress, Eastern Shore Republican Robert E. Bauman and Democrat Gladys N. Spellman of Prince George's County.

Bauman, a three-term incumbent who has gained a national reputation as a sharp-witted, conservative "watchdog," has been trailing his opponent, Democratic state Del. Roy Dyson, ever since the day in early October when Bauman was charged in a District of Columbia court with soliciting sex from a 16-year-old boy. The 43-year-old congressman agreed to enter a court rehabilitation program for what he subsequently called his "twin compulsion" of alcoholism and homosexual tendencies.

Despite calls for his resignation and polls showing him as much as 21 points behind, Bauman has since tried to save his career in one hectic month of campaigning. He has raised nearly $250,000 for the effort -- compared with the $100,000 spent by Dyson -- and has told his constituents in mass-mailed letters that he is a better man for his troubles. Meanwhile, the hard-working but unobtrusive Dyson has continued to have problems gaining widespread recognition among voters, even as he puzzles over how to manage himself in a scandal-dominated campaign.

Spellman, stricken by a severe heart attack Friday night, was expected to win reelection over GOP challenger Kevin Igoe, regardless of her condition, but there was wide-spread concern yesterday among her close associates about whether she would be able to continue in office. Should she be unable to return to Congress, a special election in her Fifth District, which includes northern Prince George's and a small part of Montgomery County, would be the likely result.

While the seats of Spellman and Bauman remain in doubt, the two Democratic members of Congress who were considered most likely to lose their jobs two months ago -- young, intense Michael Barnes of Montgomery County and aging Clarence D. Long of Baltimore County, seem comfortably ahead.

Barnes' margin in the polls has ranged from 11 to 18 points over the man he defeated two years ago, former Congressman Newton I. Steers, even though Steers has invested almost $300,000 of his own fortune in his bid to redeem a loss he blamed on his own complacence. Altogether, Steers' campaign expenditures approach $500,000 -- more money than both candidates spent on the race in 1978.

Steers has presented himself as a fiscally conservative alternative to Barnes, whom he derides as a "big spender" out of step with the rest of Montgomery County, and with the economic condition of the country.

The one major state campaign that has seen no shocks or reversals is the steamroller-efficient march by Republican Sen. Charles McC. Mathias toward another six-year term. Mathias locked up the support of organized labor and various major Democratic financiers before the party's candidates could even begin to campaign this year, and the winner of the fractious Democratic primary, state Sen. Edward T. Conroy of Bowie, has been met largely with blank stares by media and voters alike in his efforts to put the silver-haired Republican on the defensive.

The Democrat's failure to mount a more serious -- or at least, better financed -- challenge to Mathias bespeaks the relative lassitude this year of the state party organization, which has also lagged behind state Republicans in organization and spending in the presidential race. At the same time, the high hopes of state GOP officials for a Republican upsurge in this year's elections have been dampened by Bauman's sudden political collapse and the apparent failure of Steers and Long's challenger, Helen Bentley, to knock out the supposedly vulnerable Democratic incumbents by now.

An upset in the presidental race, however, would make up for losses virtually anywhere else, and GOP officials were saying this weekend that a Reagan victory was still possible in Maryland. Although a Baltimore Sun poll released a week ago showed Carter eight points ahead of Reagan, a poll by the Reagan campaign at the same time showed Reagan only four points behind.

Those results prompted Reagan's strategists to send $10,000 to Maryland for a last-week blitz of locally oriented radio ads -- the first substantial financial investment Reagan has made in the state this year.