If you need to flip your mattress while rotating it, bedding and sheets will get pinned beneath your bed. Even if you only need to rotate, sheets can get tangled, catch on your bed frame, or make it difficult for you to get a grip on your mattress. Strip your bed before doing either to make your job as easy as possible. Pull your mattress away from the headboard, wall, or the head of your bed frame, if possible. Some four poster beds, beds with footboards, and large mattress beds, like king sized ones, may require you to first lift the bottom of the mattress to pull it away from the headboard and rest on the footboard. This position will allow you to most easily helicopter your mattress around on your box spring or frame. Then grasp your mattress by one corner, lift up slightly, and drag it so the bottom faces either the left or the right side.  Check the sides of your mattress for handles. Some mattresses include side handles to make maneuvering and transportation easier. You can rotate your mattress to whatever side is most convenient. Your end goal is to re-position the foot of your bed so it becomes the head. Recenter your mattress after you have pointed the bottom to either the left or the right. The starting head and foot of your bed should be hanging off the left and right sides now, with the mattress roughly in the middle of your box springs or frame. King and Queen sized mattresses may be hard to maneuver with just one corner. If you have a bed this size or larger, you will likely have the easiest time rotating your mattress by propping it on the head- or footboard and sliding it a little at a time until the foot and head of the mattress are pointing off to the sides. You should not prop and pivot your mattress on your head- or footboard if either have sharp angles that might catch on your mattress or if these are not stable. In this case, offset your mattress by pushing one corner of the foot of the mattress inward with respect to the frame and one corner of the head of the mattress outward. The resulting orientation should be offset and tilted on an angle. Grasp your mattress again by the corner and begin sliding it so the bottom takes its new place at the head of the bed. Once your bed is mostly in position, you can make small adjustments until it is completely centered, unless you need to flip your mattress. Once your mattress is rotated, flip-needing mattresses will have to be turned over.  The size of king mattresses makes these prone to developing a hump in the middle. Thanks to the fact that these mattresses are mostly square, you can prevent this hump from forming by only rotating these mattresses 90-degrees and not finishing the rotation. Except for king size mattress, your bed should now be oriented normally, with its long side running from the head of the bed to the foot of the bed. The head and foot of your mattress should now be in exchanged positions. Pull your mattress to either side of your bed so that about half of it hangs off your box springs or frame. Take the overhanging side and lift it until your mattress is standing straight up. Then lower the tall end to the opposite side of the bed. End-over-end flipping can be done similarly; pull and prop your mattress on the head- footboard and then raise the overhanging side and lower it until the bottom of the mattress takes the place of the top.  Generally, you should flip your mattress alternating between side-to-side flipping and end-over-end flipping unless your mattress tag/instructions indicate otherwise. After flipping your mattress, it should overhang the opposite side of the bed. However, at this point it is rotated and flipped. All you need to do is push your mattress into place on your box spring or frame and you're done.

Summary:
Strip your bed. Position your mattress. Complete your rotation. Flip your mattress, if necessary.