He repeatedly asked the umpire for more than the allowed 25 seconds recovery time between points.
A visibly drained Monfils had earlier looked close to retiring after taking the first set over a slow-starting Djokovic.
Djokovic's third-round opponent Gael Monfils said on Thursday he was "dying on court" in the hot conditions.
Djokovic said there should be rational conversations about rules that are imposed and that concern players' well- being. "I thought, it is going to be a big challenge for both of us".
Federer added that it was good that the players were talking to one another. It's just things that surface every day.
And soon they'll be one: There are two Grand Slam singles champions left in the women's draw, and they will play each other Saturday in the third round - Maria Sharapova (2008 Australian Open winner) vs. Angelique Kerber (2016 Australian Open champion).More news: We Happy Few has been delayed
More news: Saudi intercepts ballistic missile
More news: Calif. parents of 13 children held captive charged with torture
With the temperatures a manageable 26 Celsius (79 Farenheit) at Melbourne Park after two days of oven-like conditions, the Russian was no match for the German, flopping 6-1, 6-3 in a battle of the former champions. Maria's a champion, she played so good the last few weeks.
"I was so happy that we have 2018 and not 2017 anymore", an emotional Kerber, who looks to have overcome her form struggles of a year ago, said after the match.
Wawrinka also failed to progress and was defeated by American Tennys Sandgren.
Roger Federer asked Australian Open organisers for his second-round win over Jan-Lennard Struff to played during the evening session in Melbourne, in order to avoid the searing temperatures that reached almost 40 degrees on day four of the opening grand slam of 2018. But not this time.
Sharapova's first set against Sevastova was particularly impressive, including 12 winners and losing just nine points.
"You know, it was a warm day".
No. 5 Dominic Thiem rallied from two sets down to defeat 190th-ranked American qualifier Denis Kudla 6-7 (6), 3-6, 6-3, 6-2, 6-3.
After the injury timeout, Djokovic went on to break his rival's next serve, getting a 4-1 advantage that he built on to seal the second set against Viñolas, who was making his first appearance in the Australian Open third round.
Eighth seed Caroline Garcia also stayed in the title hunt, but she found it hard going against Czech teen Marketa Vondrousova, who pushed her to three gruelling sets.