B737-800
Flight Crew Air Transport Pilot (ATP)
Aircraft Equipment Problem Less Severe; Deviation - Altitude Excursion From Assigned Altitude
Flight Crew Overcame Equipment Problem; General Maintenance Action
Aircraft
In cruise flight at FL380; .78 Mach; autopilot CMD B engaged; the jet suddenly began 'driving' or yawing to the right. I would describe the motion as more of a constant drive and definitely not a 'snap' movement. I immediately grasped the yoke and attempted to return the nose of the jet back to its original position. Concurrently; I scanned the instruments/lights for any signs of an engine rolling off or other indications pertaining to this unexpected movement (hydraulics; yaw damper; etc.). The CA (pilot not flying) felt the jet move and asked me what I was doing; my response was that I was not making any inputs to the jet to cause this drive/yaw and that my feet were flat on the deck when this motion ensued. As the drive deepened the jet started to roll to the right. I immediately clicked off the autopilot while simultaneously announcing my action. I manually flew the jet back into our original state (.78 at FL380). I believe we may have gained/lost +/- 60 feet but I don't recall how many degrees of heading changed; I'm also not certain how much we rolled but I'm guessing it was around 5 degrees when I reacted. After some discussion; the CA elected to engage autopilot CMD A. The flight proceeded normally with no further anomalies.It was night; no turbulence or chop; and no 'heavies' nearby that might have generated a wake turbulence event. The CA requested maintenance meet us at the jet for a debrief. After we debriefed the maintainer and after the passengers had deplaned; two of our flight attendants (the number 1 and one from the back) asked us 'what the heck happened back there.' They went on to describe their experience similar to the sensation of being on a boat. A yawing; mushy feeling of working through waves; etc. Both also declared being somewhat disoriented by the motion; perhaps due to inner ear fluid movement. After the flight attendants were debriefed by the CA and myself; we surrendered the jet to maintenance; deplaned and concluded our sequence.
B737-800 First Officer reported the aircraft yawed to the right at FL380 with Autopilot B engaged.  Substituting Autopilot A solved the problem.