Marquez underwent surgery on a finger injury last week, which he suffered during a dirt bike training accident last weekend.
The 22-year-old was in eighth place after FP1, but set the second fastest time of FP2 behind Yamaha's Jorge Lorenzo.
His best of 1m 39.428s was set eight minutes before time in FP2, which left him a quarter of a second behind the Lorenzo's best.
"We can be happy that my hand has responded quite well today – as well as could be expected," Marquez said.
"It hurts a lot but at least I can put in the laps. We'll see if tomorrow it is better if it doesn't swell up.
"As for the bike, I'm feeling pretty good with it and we are working well, but we need to improve some things – especially in the afternoon – when the track temperature rises," he added.
"The race will be at this time, so we have to improve the set-up accordingly."
Marquez goes into this weekend's race at Jerez trailing Championship leader Valentino Rossi by 30 points, following their coming together on the penultimate lap of the race in Argentina last month.