Legend also tweeted: "Imagine being president of a whole country and spending your Sunday night hate-watching MSNBC hoping somebody--ANYBODY--will praise you"

In a series of tweets not long before midnight on Monday, President Donald Trump — sleepless and seemingly in a foul mood — targeted John Legend and Legend’s wife, Chrissy Teigen, for what he said was a failure to give him enough credit for supporting criminal justice reform.

Both Legend and Teigen responded to the attack with, basically, social media side-eye.

“Melania, please praise this man. He needs you,” Legend, 40, answered Trump’s criticism in part.

Addressing her young daughter with Legend, Teigen tweeted, “Luna, remember the night before your first day of school? When mommy was making your sign and the p—- a– bitch president had his 9th meltdown of the day.”

Trump’s ire was evidently touched off by a Sunday night special on MSNBC: a town hall about criminal justice, with NBC Nightly News anchor Lester Holt and featuring Legend.

NBC’s coverage has noted that Trump, 73, signed the First Step Act, a reform measure, into law last year. The town hall also covered an inmate freed by the law’s changes.

Still, starting at 11:11 p.m., Trump went on the attack.

“I got it [criminal justice reform] done with a group of Senators & others who would never have gone for it,” Trump tweeted, adding, “[P]eople that had virtually nothing to do with it are taking the praise. Guys like boring musician @johnlegend, and his filthy mouthed wife, are talking now about how great it is – but I didn’t see them around when we needed help getting it passed.”

Teigen, 33 — as comfortable on Twitter as Trump and a ninja with the clapbackresponded, “The absolute best part of his tweet is I literally didn’t speak in the special, nor was I mentioned. I’m cackling at the pointless addition of me because he cannot not be a bitch.”

In another rejoinder to Trump, who labeled her “filthy mouthed,” Teigen told her followers, “No guys no please do not make this trend, for it is my fight with #PresidentP—-A–Bitch, not yours!!!!!!”

From left: Chrissy Teigen and President Donald Trump
| Credit: Jeff Vespa/WireImage; Alex Wong/Getty
John Legend and Chrissy Teigen
From left: Chrissy Teigen and John Legend
| Credit: Kristy Sparow/Getty

Legend also tweeted, “Imagine being president of a whole country and spending your Sunday night hate-watching MSNBC hoping somebody–ANYBODY–will praise you.”

“Your country needs you, Melania,” he added in another tweet, referring to First Lady Melania Trump.

Both Legend and Teigen have been outspoken critics of the president. Earlier this year, Legend said Trump was a “flaming racist” for describing Baltimore as a “rodent infested mess” and in other inflammatory terms — apparently because a Baltimore lawmaker, Rep. Elijah Cummings, is one of Trump’s notable critics.

“Our president is a flaming racist. He’s a piece of s—. He says piece of s— s— all the time. That’s what he does,” Legend told TMZ in July. “We need to get him out of office.”

Teigen has had strong words for Trump too, tweeting in 2016 before he was elected: “He is truly, truly, a f—— monster.”

Criminal justice reform, the topic that ignited the latest in Trump’s long list of Twitter fights, has been one of the lone areas of bipartisanship in his administration, which has largely turned on more divisive issues such as blocking immigrants from the country.

Trump has found some celebrity allies with his criminal justice work, such as Wynonna Judd and Kim Kardashian West.