On Wednesday, the day before racing at the Bahrain International Circuit began, the McLaren driver felt ill and initially returned negative tests.
Sainz had led until Magnussen's late 1:33.207s flier, as Ferrari continued to live up to their rivals' claims of being strongest.
The Danish racer used to be a part of Haas until the 2020 season, after which he and Romain Grosjean were replaced.
Kevin Magnussen began his F1 career at McLaren in 2014 and he then spent time at Renault and Haas with mixed results.
Mazepin was already under the microscope before he even started his first F1 race due to his off-track antics.