Short answer
Side sleeping breaks a sleep mask for mechanical reasons, not quality reasons: the pillow pushes the mask sideways instead of pressing it flat, the strap crosses the part of your skull being squashed into the pillow, and turning over drags the mask across your face rather than lifting it off. What helps is a strap low on the back of the head and clear of the ear, a mask that does not stand far off the face, and a seal landing on bone. If several masks have already shifted on you, the fix that does not depend on lying still is blackout at the window.
This page is only about the pillow; for the general case, see do sleep masks actually work.
Side sleeping is the majority case, and masks are not designed around it
Erlend Skarpsno and colleagues published accelerometer recordings from 664 adults in Nature and Science of Sleep in 2017, taken at home rather than in a lab. Participants spent roughly 54% of their time in bed on their side, 37% on their back and 7% face down. Yet masks are photographed and reviewed in the minority case, because a face pointing at the ceiling is the easy problem.
What the pillow actually does to a mask
Four mechanisms, and they stack.
The force is sideways, not downward. On your back, the only load is the mask's own weight pressing it into your face, which is where the seal wants to go anyway. On your side, the pillow pushes on the mask front roughly parallel to your face. Foam and fabric are strong in compression and weak in shear, so the front skids across the skin while the strap holds the back of your head.
The strap crosses ground that is being compressed. You tension it sitting up, on an uncompressed skull with your hair where it normally sits. Lying down flattens the hair and tissue on the pillow side, shortening the path the strap covers. It goes slack on exactly the side you need it tight, and tightening to compensate leaves it too tight the rest of the night.
The pillow grips the strap. Friction between pillowcase and strap is often higher than between strap and hair, so the pillow holds the strap still, your head rotates inside it, and the mask front travels with the strap rather than your face.
Turning over drags rather than lifts. Rolling over does not take your face off the pillow first. The mask stays in contact through the rotation, scrubbed across your cheek and brow, moving a little each time. Six or eight turns later it is on your forehead. That is why a mask passes the bedtime test and fails by 4am.
Nobody has studied sleep mask displacement, so there is no direct research on this. The closest analogue is CPAP, where leaked air makes the seal measurable: Marius Lebret and colleagues analysed 74 overnight polysomnograms in Chest in 2018 and found body position other than supine independently associated with unintentional mask leak. Different object under different loads, so take that as support for the principle, not evidence about eye masks.
Strap position: below the occiput, clear of the ear
The back of your skull is not a sphere. There is a bony bulge low down, the external occipital protuberance, and below it the head curves inward toward the neck. A strap on or just under that bulge is held by the shape of the bone. A strap higher up, across the crown, sits on a dome with only friction against hair keeping it there, so any nudge sends it upward. That is why masks end up on foreheads. Split straps passing above and below the bulge hold best, trapping the widest part of the skull.
The ear matters as much and gets ignored. A strap crossing the pinna springs out of position and folds the ear forward against the pillow, and the soreness that follows is what wakes you, not the light. Route it above or below the ear.
Strap width, and why wider is not automatically better
Wider straps spread tension and resist rolling; a narrow elastic under load rolls into a cord, which concentrates pressure and slides more easily. Face up, wider wins.
On the pillow it is a trade-off, because a wide strap grips the pillowcase over a bigger area, anchoring it to the bedding while your head turns inside it. There is a genuine argument that on the pillow side you want the strap to slide rather than grip, which points the opposite way from the general advice, and nobody has tested it. What is unambiguous is that buckles and sliders become hard pressure points that can lever the mask, and that hook-and-loop fastening catches on pillowcases and hair.
Depth, and the case against a deep cup on the pillow side
Contoured masks seal on bone rather than soft tissue, along the brow ridge, the sides of the nose and the cheekbone, leaving space in front of the eye. That is the right idea, and it is why eyelid pressure disappears.
But depth cuts both ways, and this is worth reasoning through rather than taking on faith. The deeper the cup, the further the mask front stands off your face, and the further any force at the front acts from the seal line. A pillow pressing on a protruding cup applies a twisting force about the rim, and depth gives it leverage. So the deep mask that is most comfortable on your back can be the worst offender on your side, and a shallower, narrow-rimmed shape is the better compromise.
A subtler one: lying on your cheek pushes that cheek's soft tissue upward and forward, the same displacement as a lopsided smile. If the lower seal sits on that tissue rather than the cheekbone itself, the seal opens from below with no strap slippage at all.