Hayden matches his best qualifying performance of the year by sealing sixth on the grid for the Malaysian Grand Prix, ending within two tenths of Tech 3 Yamaha's Colin Edwards in fourth.
Hayden said late night set-up changes had paid dividends, but despite almost dropping the bike on several occasions during qualifying felt the Ducati still had more time to offer.
"On my last soft tyre, I was pushing the front, and I had a couple moments where I was basically down but managed to stay on the bike," Hayden said.
"We matched our best qualifying time of the year, but truthfully, I think the bike was capable of a bit better. The front row was about a half-second away, but fourth wasn't out of the question.
"The mechanics all worked hard last night changing geometry and the transmission, and I'm thankful because the bike was immediately better. We know race distance around here is a long, hard day, but that's why you put in the time doing the training."
Rossi meanwhile will start from ninth, directly behind Hayden. He suffered a fall at Turn 10 during qualifying, necessitating a switch onto the second bike which he said was not set up as well.
"Today went better - I was able to ride more effectively, although the fall was really a shame because it was the usual type, which means that we still have to solve that problem," Rossi explained.
"In addition I had to use the second bike, which I didn't like quite as much. We're pretty good on most of the track, but we lose a lotsix of the nine tenths in our gap to the frontin T4.
"Anyway, our pace has improved, especially with the hard tyre. We'll make the decision at the last minute after evaluating tomorrow's conditions, and it will really be crucial."