The league leaders powered to a 5-1 victory on Friday night to open up a 10 points gap at the top of the table.
Victor Osimhen scored a brace while Khvicha Kvaratskhelia, Amir Rrahmani and Elif Elmas also added their names to the scoresheet.
Angel Di Maria was the sole goalscorer for Juve who endured their first league defeat since early October.
"There are some defeats that are deserved and some that are undeserved. This time it was deserved," Allegri told DAZN.
"We had the strength to try to turn it around, but it didn't turn out like that. We can't let our heads drop because there's a long road ahead.
"We must congratulate Napoli. We were low on energy and were too deep for the first 20 minutes. We had good chances but every time they had a shot they could've scored.
"It is now about getting back on our feet, recovering energy and starting work again. The championship race is long so we must look forward."
Juventus entered the match having kept a clean sheet for 770 minutes, though Allegri's men collapsed in the second half and suffered their biggest defeat since 1993.
"You don't always have to find justification," added the manager.
"These goals we conceded, that wouldn't have happened had we had more energy. After the third goal, the world falls in on you.
"Osimhen had an extraordinary match and Napoli are showing they are the strongest team. Maybe in two months things will change. What is valid today is not valid tomorrow."