Defending champion Bagnaia is seven points behind Spaniard Martin ahead of the race in Italy which replaced the cancelled event in Kazakhstan.
Ducati's Bagnaia posted a blistering one minute 30.286sec to improve his previous record achieved on the same circuit for the San Marino MotoGP earlier this month by 0.018 sec.
Ducati-Pramac's Martin was second despite a fall at the end of the session with Gresini's Marc Marquez third fastest.
Yamaha's Fabio Quartararo finished fifth with Pramac’s Franco Morbidelli in sixth.
Riders outside the top ten have to go through Q1 on Saturday morning while the top 10 participate directly in Q2 in the afternoon.
That will determine the first twelve places on the starting grid for the sprint race later Saturday with the main race on Sunday.
Ducati, meanwhile, can claim their fifth consecutive constructors title with five races remaining if they finish the weekend at least 222 points ahead of closest rival KTM.
Free practice times on Friday:
1. Francesco Bagnaia (ITA/Ducati) 1:30.286 (Q), 2. Jorge Martín (ESP/Ducati-Pramac) at 0.198sec (Q), 3. Marc Marquez (ESP/Ducati-Gresini) 0.299 (Q), 4. Enea Bastianini (ITA/Ducati) 0.321 (Q), 5. Fabio Quartararo (FRA/Yamaha) 0.600 (Q), 6. Franco Morbidelli (ITA/Ducati-Pramac) 0.646 (Q), 7. Marco Bezzecchi (ITA/Ducati-VR46) 0.678 (Q), 8. Maverick Vinales (ESP/Aprilia) 0.704 (Q), 9. Pedro Acosta (ESP/GasGaS-Tech3) 0.705 (Q), 10. Aleix Espargaro (ESP/Aprilia) 0.881 (Q)
11. Jack Miller (AUS/KTM) 0.931, 12. Johann Zarco (FRA/Honda-LCR) 0.964, 13. Fabio Di Giannantonio (ITA/Ducati-VR46) 1.107, 14. Alex Marquez (ESP/Ducati-Gresini) 1.227, 15. Brad Binder (RSA/KTM) 1.362, 16. Miguel Oliveira (POR/Aprilia-Trackhouse) 1.382, 17. Raul Fernandez (ESP/Aprilia-Trackhouse) 1.434, 18. Luca Marini (ITA/Honda) 1.479, 19. Joan Mir (ESP/Honda) 1.638, 20. Augusto Fernandez (ESP/GasGaS-Tech3) 1.814, 21. Takaaki Nakagami (JPN/Honda-LCR) 1.924