Matsuzaka has been on Boston's disabled list since April 3 with a neck strain. He walked one, struck out three and hit two batters against Rochester.
He threw 43 of 73 pitches for strikes and reached 93 mph on the McCoy Stadium radar gun.
Rochester loaded the bases with two outs in the fifth on a walk and two hit batters. Matsuzaka escaped this jam by retiring Matt Tolbert on a foul ball to third base.