(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?"

JUST WATCHED Clinton: Who gets up at 3am for a Twitter attack? Replay More Videos ... MUST WATCH Clinton: Who gets up at 3am for a Twitter attack? 01:56

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.

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! — Donald J. Trump (@realDonaldTrump) September 30, 2016

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."

JUST WATCHED Why won't Trump's campaign confiscate his phone? Replay More Videos ... MUST WATCH Why won't Trump's campaign confiscate his phone? 05:38

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.

JUST WATCHED Ex-Miss Universe: Trump called me 'Miss Piggy' Replay More Videos ... MUST WATCH Ex-Miss Universe: Trump called me 'Miss Piggy' 02:49

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."

Photos: The first presidential debate Republican presidential nominee Donald Trump shakes hands with Democratic presidential nominee Hillary Clinton at the first presidential debate on Monday, September 26. Hide Caption 1 of 21 Photos: The first presidential debate NBC's Lester Holt moderated the debate, which was held at Hofstra University in Hempstead, New York. Hide Caption 2 of 21 Photos: The first presidential debate The debate took place 43 days before Election Day. There are two more debates scheduled. Hide Caption 3 of 21 Photos: The first presidential debate Clinton, 68, is the first woman to lead a presidential ticket for one of the major political parties. She has been a U.S. senator and secretary of state. Hide Caption 4 of 21 Photos: The first presidential debate This was the first one-on-one debate for Trump, a billionaire real estate developer and neophyte politician. The 70-year-old has shattered every rule and convention in politics with his stunning presidential campaign. Hide Caption 5 of 21 Photos: The first presidential debate Clinton is clinging to a narrow lead in many national polls, but she now has almost no margin of error in the battleground states that will decide who will take the oath of office in January. Hide Caption 6 of 21 Photos: The first presidential debate Trump has been picking up momentum lately in the polls. CNN's Poll of Polls finds Clinton and Trump neck-and-neck nationally, with Clinton leading 44%-42%. Hide Caption 7 of 21 Photos: The first presidential debate Clinton answers a question during the debate. Hide Caption 8 of 21 Photos: The first presidential debate The candidates clashed repeatedly over the economy, tax cuts for the wealthy and ISIS. Hide Caption 9 of 21 Photos: The first presidential debate Trump smiles during the debate. Hide Caption 10 of 21 Photos: The first presidential debate Clinton smiles during the debate. Hide Caption 11 of 21 Photos: The first presidential debate Trump and Clinton shake hands before the start of the debate. Hide Caption 12 of 21 Photos: The first presidential debate The debate was attracting worldwide interest, with a television audience expected to approach 100 million. Hide Caption 13 of 21 Photos: The first presidential debate Clinton waves to the crowd after shaking hands with Trump. Hide Caption 14 of 21 Photos: The first presidential debate Trump's wife, Melania, shakes hands with Clinton's husband, former U.S. President Bill Clinton. Hide Caption 15 of 21 Photos: The first presidential debate From left, in the front row, are Melania Trump; Trump's daughter Ivanka Trump; Trump's running mate, Indiana Gov. Mike Pence; Pence's wife, Karen; retired U.S. Army Gen. Michael Flynn; and former New York Mayor Rudy Giuliani. Hide Caption 16 of 21 Photos: The first presidential debate Bill Clinton, sitting next to daughter Chelsea, waves to the audience before the debate. Hide Caption 17 of 21 Photos: The first presidential debate The crowd was urged to stay quiet throughout the debate, but there was occasional applause and laughs. Hide Caption 18 of 21 Photos: The first presidential debate Trump and Clinton face off in the debate. Hide Caption 19 of 21 Photos: The first presidential debate Clinton is seen on television monitors in the media center at Hofstra. Hide Caption 20 of 21 Photos: The first presidential debate Trump appears on the media center screens. Hide Caption 21 of 21

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.

JUST WATCHED Trump on Miss Universe: I saved her job Replay More Videos ... MUST WATCH Trump on Miss Universe: I saved her job 00:49

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."

JUST WATCHED Former 'Miss Universe' speaks out Replay More Videos ... MUST WATCH Former 'Miss Universe' speaks out 01:08

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.