DON'T make up an excuse now. The professor will be suspicious since you've already intimated that you could be late. Just power through.
A quick tale for inspiration. I pulled an all-nighter in college to finish some horrible 11 page research paper on colonial contact with the Hawaiian islands and an analysis of its impact on the islands' culture, language, etc. Mind you, I had not written one word when I began the afternoon before it was due. I hadn't even done that much research. The paper needed to be handed in sometime before noon. At around 4:15 in the morning when I was about half way done with the paper, I realized I had another paper due the next day for a class that I pretty much didn't go to for the second half of the quarter. It was an English lit class and I hated the teaching style. We weren't required to be there, but not being there meant I completely neglected my reading for it. So, I picked one of the books from the second half. Finished my research paper, power read/ skimmed Toni Morrison's Sula, coughed up a thesis and churned out another paper, all before noon later that day.
Even better? I bagged an A and A- on the papers respectively.
So-- Disconnect from the internet, brew a pot of coffee and get going. You can do it.