Can’t sleep? Tweet!

Oft-late Mayor Bill de Blasio took his campaign against his predecessor’s presidential ambitions into uncharted territory Thursday — the early morning.

De Blasio — awake, he said, thanks to medication he was put on following his knee surgery — blasted out a Twitter missive at 4:16 a.m. in anger over an answer Mike Bloomberg gave about ‘stop-and-frisk’:

“There is a special narcissism to billionaires. They can’t see like the rest of us. Here’s what actually happened, @MikeBloomberg: I called for an end to your broken policies, got elected + changed them. None of us needed to ‘learn’ what we already knew. The people had told us.”

When asked what compelled the usually slow-rising and oft-tardy Hizzoner to tweet before sunrise, de Blasio told reporters during an unrelated press conference he was already awake thanks to the post-surgery medication.

“Because of my knee surgery, the medications that I’m on have been keeping me awake,” he said. “That’s what compels me to be awake. When I’m awake, I want to read something and I read the story about the CNN town hall.”

He continued: “And, I’m reading the story and minding my own business and I get to the last line — which was Anderson Cooper having really pressed him on stop and frisk, and when he says, ‘You know, I hope my successor has learned from my mistakes.’ There was a surrealism to it that just drove me crazy.”

The criticism is nothing new for de Blasio, who built his successful 2013 mayoral campaign around criticism of the controversial policing practice.

What made this tweet different was the early morning hours when he sent it.

De Blasio’s long struggled with promptness, especially in the morning.

He typically doesn’t leave Gracie Mansion until 8 a.m. to travel to a Brooklyn YMCA and doesn’t usually make it to City Hall before 10:30 a.m., records obtained by The Post show.

The day after the paper splashed the exclusive story on its front page this week, de Blasio even managed to show up late to the gym.

Most infamously, Hizzoner arrived 20 minutes late to the annual memorial for victims of American Airlines Flight 587 crash in 2014.

City Hall initially blamed on dense fog, but Hizzoner later admitted he had a “rough night” and felt “really sluggish” that morning.