Government watchdogs slammed state lawmakers for passing watered-down ethics reforms during a legislative session that saw two of the three most powerful people in Albany sentenced to prison for corruption.

Bleary-eyed legislators waited until 5 a.m. on the final day of the legislative year to push through a bill regulating political consultants, lobbyists, not-for-profits and fund-raising committees.

But the measure only stripped politicians of their pensions upon conviction of corruption charges. Stronger proposals to ban their ability to earn outside income and restrict contributions from limited liability corporations — actions that led to the downfall of former Assembly Speaker Sheldon Silver and former Senate Majority Leader Dean Skelos — went by the wayside.

The ethics bill was “stunningly inadequate” in a year of “unprecedented” lawmaker lawbreaking, said New York Public Interest Research Group director Blair Horner.

“We’ve never had both legislative leaders facing prison time, and the way Albany responded was to find the lowest-hanging fruit and pass it with inflated rhetoric touting how it’s a great victory,” he said.

Gov. Cuomo and legislative leaders who are “staffed with people who succeeded under the current rules” share the blame, Horner said.

Gov. Cuomo said the last-minute legislative package brought “transparency, trust and faith to state government.”

When it was time to vote in the wee hours of the waning session, members tweeted their disgust.

“At 3:13 am the Senate passes the ‘little Ugly’ bill,” wrote Westchester Democratic Sen. George Latimer. “Everything wrong with Albany. Passed the Senate 60-1. I voted NO.”

And Manhattan Democratic Sen. Liz Krueger called it “rearranging the deck chairs on the Titanic.”

The new bill would force consulting firms that do business with the state and city to disclose their clients, make issue-advocacy groups and lobbyists reveal their funding sources and restrict how independent committees communicate with and give cash to candidates.

Albany insiders said many of the measures were slipped in to curb Mayor de Blasio’s electioneering ability, and his reliance on outside consultants, including Berlin Rosen, as he seeks a second term in 2017.