(CNN)What does the Republican nominee for president do when he can't sleep?
Awake at 3 a.m. ET, Donald Trump picked up his phone and began tweeting about "made up lies" in the media.
Just two hours later, he opened up Twitter again and quickly went from venting to slandering a former beauty queen -- shaming her for a sex tape for which the campaign has not provided evidence.
Trump's conduct since the first debate has been astonishing for a major party nominee just 39 days away from the election. Instead of zeroing in on his strongest points from Monday night on jobs and trade, he's cited fake polls, resurfaced Bill Clinton's marital scandals from the 1990s, floated a conspiracy theory about Google searches and attacked 1996's Miss Universe.
And after Hillary Clinton raised allegations that Trump called 1996 Miss Universe Alicia Machado "Miss Piggy" and "Miss Housekeeping," Trump has kept that controversy alive by refusing to apologize, instead seeking to discredit Machado and justify his apparent comments and similar ones he made in interviews at the time.
The overnight tweeting spree once again brought into focus Trump's apparent unwillingness or inability to back away from a fight, regardless of who is attacking him. It's a habit that serves to keep the attention away from his core campaign message and also emphasizes Clinton's argument that Trump lacks the temperament to be president.
"By the way, who gets up at three o'clock in the morning to engage in a Twitter attack against the former Miss Universe?" Clinton asked supporters in Coral Springs, Florida. "I mean, he hurled as many insults as he could, really. Why does he do things like that?"
She added that the late-night rant was "unhinged" and proved he is "temperamentally unfit" for the Oval Office, a line of attack she's used before.
Trump defended himself via Twitter Friday afternoon.
"For those few people knocking me for tweeting at three o'clock in the morning, at least you know I will be there, awake, to answer the call!" he tweeted.
Asked by WZZM in Grand Rapids, Michigan, about his tweeting habits, Trump said he finds the medium "effective."
"It's one way you communicate whereas you know two years ago, five years ago, 20 years ago you wouldn't have this, but now it's a modern day way of communicating," he said Friday. "I find it very effective."
Asked Friday by CNN's Jake Tapper why Trump's phone hasn't been taken away from him, campaign surrogate Sarah Huckabee Sanders replied, "I don't think we're -- anybody's taking anybody's phone away."
Reminiscent of Khan feud
Clinton called Machado Friday on her drive from her first event in Florida to the airport in Vero Beach, according to Nick Merrill, Clinton's spokesman. The call lasted around five minutes.
Clinton started by thanking Machado for all she has done and for the courage she has shown, Merrill said. Machado responded by saying that she supported Clinton for a long time and she will continue to support Clinton and I will continue to stand up to Trump.
It was reminiscent of Trump's rough and tumble month of August when he skirted numerous controversies and refused to back down after the Khans, parents of a Muslim US soldier who died in Iraq, criticized him for his Islamophobic rhetoric and policies.
Even as his top advisers urged him to abandon his feud with the Khans, Trump escalated it, suggesting Ghazala Khan, the mother, stood silently alongside her husband at the Democratic National Convention because she was subservient to her husband and comparing his own sacrifices to the family's loss of their son.
It's also become clear that Trump's supporters are less than thrilled with his decision to keep the Machado controversy alive.
Kellyanne Conway, the billionaire's campaign manager, said Thursday on "The View" that she reprimanded Trump for his comments on "Fox and Friends."
And Trump supporter Kayleigh McEnany, a CNN political commentator, rebuked Trump Friday morning for his overnight tweeting, saying, "I don't think Donald Trump needs to be doing that."
The controversy started when Clinton brought up Trump's comments and treatment of Machado at Monday's presidential debate. The next morning, Trump doubled down.
"You know, she gained a massive amount of weight (after winning Miss Universe) and it was a real problem. We had a real problem," Trump said on "Fox and Friends" the morning after the debate.
He defended himself similarly in an interview the next day with Fox News' Bill O'Reilly.
As Machado did the media rounds and the Clinton campaign continued to attack Trump over his treatment of Machado, Trump apparently couldn't shake the hits. And that's when he pulled up Twitter in the wee hours of Friday morning, and began firing off.
"Wow, Crooked Hillary was duped and used by my worst Miss U. Hillary floated her as an 'angel' without checking her past, which is terrible!" he tweeted.
"Using Alicia M in the debate as a paragon of virture just shows taht Crooked Hillary suffers from BAD JUDGEMENT! Hillary was set up by a con," he continued at 5:19 a.m.
And finally, "Did Crooked Hillary help disgusting (check out sex tape and past) Alicia M become a U.S. citizen so she could use her in debate?"
Machado's past has come under intense scrutiny in recent days, including accusations from Trump's surrogates that she drove a getaway car from a murder scene in Venezuela in 1998, to which Machado replied on CNN this week that "I have my past" and that she is "no saint girl."
"He can say whatever he wants to say. I don't care. You know, I have my past, of course everybody has a past. And I'm no saint girl," Machado told CNN's Anderson Cooper Tuesday on "AC360." "But that is not the point now ... (Trump) was really rude with me, he tried to destroy my self esteem. And now I'm a voice in the Latin community. I'm in a great moment in my life and I have a very clear life. And I can show my taxes."
Machado has also appeared in a reality TV show in which she appears to engage in a sex act under the covers with another contestant -- which some tabloids and conservative outlets have pointed to as evidence of a sex tape.
Supporters of the Republican nominee have argued since Trump's roller coaster month of August that he has evolved as a candidate: he shook up his campaign leadership and has faithfully stuck to delivering rally speeches from a teleprompter, minimizing the number of controversies he can stoke.
But late at night, with his campaign staff far from his side, Trump was free to follow his gut. And his gut told him to punch back at a former Miss Universe whom he allegedly once called "Miss Piggy" after she gained weight by calling her disgusting for starring in a sex tape.
And so that's what he did.
Jeremy Diamond is a reporter for CNN Politics, tracking everything from the 2016 election to breaking news out of Washington to foreign policy. CNN's Dan Merica contributed to this report.
Spread the word