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.
The only hits he allowed were a line-drive double by former Minnesota Twin Jacque Jones in the third and a fly-ball double by Luke Hughes in the fourth.
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.