Donald Trump’s social media behaviour took another surreal turn with a public attack on model Chrissy Teigen and her musician husband John Legend over the issue of criminal justice reform.

The president, it seems, was reacting to a perceived slight – in this instance not getting enough credit for signing a bill that increases the chance for some offenders to become eligible for parole.

The law, supported by Democrats and Republicans, was also championed by Trump’s son-in-law Jared Kushner, and was discussed by Legend on Lester Holt’s MSNBC show on Sunday night.

That appeared to enrage Trump, who fulminated in a late-night tweet: “I SIGNED IT INTO LAW, no one else did, and Republicans deserve much credit.” Trump complained that “people that had virtually nothing to do with it are taking the praise”.

The president went on: “Guys like boring musician John Legend 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.”

In response, Teigen tweeted of Trump: “Lol, what a pussy ass bitch. Tagged everyone but me. An honor, Mr President.”

lol what a pussy ass bitch. tagged everyone but me. an honor, mister president. — christine teigen (@chrissyteigen) September 9, 2019

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

The exchanges drew the attention of the former White House communications director Anthony Scaramucci, a once vocal supporter of Trump who has belatedly emerged as a critic.

He called Trump’s behavior “despicable”.

Scaramucci told CNN: “Have any of the other presidents in recent history – modern history – gone after their private citizens whether they’re celebrities or not celebrities?”

Trump signed the First Step Act in December. The act will reduce mandatory minimum sentences in certain cases. More than 3,100 people will be released from federal prison under the law.