Unannounced testing has been permitted at the race since 2016, with riders subject to on-the-spot tests between the hours of 23:00 and 06:00 local time.
Yellow jersey Pogacar was tested at 05:00, a UAE Team Emirates-XRG spokesperson told Reuters.
"I got four hours of sleep today," Pogacar said before the start. "I couldn't fall back to sleep. It was definitely not nice to wake up in the middle of sweet dreams."
"They come randomly in the mornings through the tour, and today they chose nighttime."
Vingegaard said he was tested at 02:00.
"The ITA (International Testing Agency) didn't allow me to sleep much. I was sleeping very well, but somebody knocked on my door at 2 a.m., big surprise to me," the two-time Tour winner said. "Of course, it's good that they test, but when it's affecting performance and your sleep, I don't think it's so good."
"It took me about 40 minutes before I was back in my room, so not the best night."

