“For Barack Obama it’s midnight in a coal mine.”

When Ronald Reagan ran for re-election in 1984, his slogan was “Morning in America.” For Barack Obama, it’s more like midnight in a coal mine.

The sputtering economy is about to stall out, unemployment is high, his jobs program may not pass, foreclosures are rampant, and the poor guy can’t even sneak a cigarette.

His approval rating is at its lowest level ever. His party just lost two House elections — one in a district it had held for 88 consecutive years. He’s staked his future on the jobs bill, which most Americans don’t think would work.

The vultures are starting to circle. Former White House spokesman Bill Burton said that unless Obama can rally the Democratic base, which is disillusioned with him, “it’s going to be impossible for the president to win.” Democratic consultant James Carville had one word of advice for Obama: “Panic.”

But there is good news for the president. I checked the Constitution, and he is under no compulsion to run for re-election. He can scrap the campaign, bag the fundraising calls and never endure another Republican debate as long as he’s willing to vacate the premises by Jan. 20, 2013.

That might be the sensible thing to do. It’s hard for a president to win a second term when unemployment is painfully high. If the economy were in full rebound mode, Obama might win anyway. But it isn’t, and it may fall into a second recession — in which case voters will decide his middle name is Hoover, not Hussein. Why not leave of his own volition instead of waiting to get the ax?

It’s not as though there is much enticement to stick around. Presidents who win re-election have generally found, wrote John Fortier and Norman Ornstein in their 2007 book, “Second-Term Blues,” that “their second terms did not measure up to their first.”

Presidential encores are generally a bog of frustration, exhaustion and embarrassment. They are famous for lowest moments rather than finest hours. Richard Nixon was forced to resign in disgrace, Reagan had the Iran-contra scandal, and Bill Clinton made the unfortunate acquaintance of Monica Lewinsky.

Administration officials get weary after four years and leave in droves.

The junior varsity has to be put into service. New ideas are hard to come by.

Someone said that when a man is smitten with a beautiful woman, he should remember that somebody somewhere is tired of her. Likewise, the most inspiring presidents get stale after years of constant overexposure.

In the event he wins, Obama could find himself with Republicans in control of both houses of Congress. Then he will long for the good old days of 2011. Mitch McConnell and John Boehner will bound out of bed each day eager to make his life miserable.

Besides avoiding this indignity, Obama might do his party a big favor. In hard times, voters have a powerfu urge to punish incumbents. He could slake this thirst by stepping aside and taking the blame. Then someone less reviled could replace him at the top of the ticket.

The ideal candidate would be a figure of stature and ability who can’t be blamed for the economy. That person should not be a member of Congress, since it has an even lower approval rating than the president.

It would also help to be conspicuously associated with prosperity. Given Obama’s reputation for being too quick to compromise, a reputation for toughness would be an asset.

As it happens, there is someone at hand who fits this description: Hillary Clinton. Her husband presided over a boom, she’s been busy deposing dictators instead of destroying jobs, and she’s never been accused of being a pushover.

Not only that, Clinton is a savvy political veteran who already knows how to run for president. Oh, and a new Bloomberg poll finds her to be merely “the most popular national political figure in America today.”

If he runs for re-election, Obama may find that the only fate worse than losing is winning. But he might arrange things so it will be Clinton who has the unenviable job of reviving the economy, balancing the budget, getting out of Afghanistan and grappling with Eric Cantor. Obama, meanwhile, will be on a Hawaiian beach, wrestling the cap off a Corona.