From the low 20,000 foot range to 45,000 feet which as I understand it is above the certified altitude of the 777. So in my mind there are 2 reasons that would explain such deviations in altitude. The first being the aircraft was experiencing mechanical difficulties in which the pilots were having a hard time controlling. Or, the cockpit crew was no longer a part of the equation and some one else was in charge.
A third conceivable reason could be that negative and positive g was introduced deliberately, to detain someone who would wanted to enter the FD.