Here is how someone scientifically views the process of mattress flipping.
To make sense of all this turning and flipping, the first thing we need is some clear notation. A mattress can be rotated around any of three orthogonal axes. I could label the axes x, y and z, but I’d just forget which is which, so it seems better to adopt the terminology of aviation. If you think of a mattress as an airplane flying toward the headboard of the bed, then the three axes are designated roll, pitch and yaw as shown in the illustration to the right. The roll axis is parallel to the longest dimension of the mattress, the pitch axis runs along the next-longest dimension, and the yaw axis passes through the shortest dimension.