Weird question but with a head of snakes, do they have to sleep with their head turned to the side? Would it hurt? Do they need an incredibly fluffy pillow?
In fact, in Ovid's metamorphoses, Perseus tells that he found Medusa (and the snakes) sound asleep, a condition that canceled the petrifying ability of the monster, thus making it easier for the hero to succeed.
I am also suggesting that sleeping on the side does not bring pain to the Gorgon, nor to the snakes.
First, some snakes seem to sleep quite a lot by themselves. Most likely, when gorgons go to sleep, their squamous head-cover is mostly napping already, hence in a relaxed "do-not-disturb" state.
Second, snakes are giant elastic tubes (youtube link to snake feeding). From the video it looks like that a section of a curled snake is perfectly capable of withstanding the weight of an alligator. There is no reason why a member of gorgon's hair should be crushed under the weight of a portion of the gorgon's skull. My guess is that the ensemble of snakes on which the gorgon is resting can withstand the weight of the gorgon's head without any pain (we can make a guess at the hair density for a good snake comfort, if the OP wishes). A simple model of this would be like sleeping with the head resting on bicycle tires. Probably no pillow is needed at all. Bonus softness if the snakes are fed with some furry rodents, or feathered animals before going to sleep.
Third, there is an obvious question on how the gorgon's skull and the skeleton of its hair are attached. One can imagine that it could be via some sort of mobile joint, which allows the snake to curl and bend around to some extent, with a maximum curvature representing the minimum radius of the volume of the hair. Again, this maximum curvature is perfectly natural and painless, just as natural as the curvature of fingers when the whole hand is resting on them. In other words, if the link is given by a mobile joint, then, unless the snakes skeletons get fractured, the skull always has a certain space from the surface on which the head is laid. Hence the "natural pillow" effect. However, either the radius is small or this seems in disagreement with some imagery. Another possibility is that the end of the snake is free relative to the skull and held in place by a rather thick hide and cranial muscles. When sleeping the muscles relax, reducing, albeit perhaps not eliminating, the "natural pillow" effect, and therefore requiring an artificial pillow. On the other hand, Ovid's does not seem to mention pillows, so either gorgons are used to sleep on hard surfaces, or the small "natural pillow" is sufficient (some people like their pillows low). I leave this last question to the more knowledgeable colleagues on WB.
First things first, it would seem to be a given that applying a heads weight worth of pressure on a small snake for ~8 hours would undoubtably be painful for a gorgon, even while using an incredibly fluffy pillow.
The good thing however, is this really is a bit of a non-problem. After all a gorgon can simply part her hair (her snakes) into two sections in the middle and have her head contact the bed there.
Of course this will mean that a gorgon will have to refrain from tossing and turning during the night.
To understand what I mean by parting the snake hair into two sections I suggest taking a look at boxer braid hairstyles. Obviously the gorgon doesn't need to braid her snakes, but the hairstyle in question does illustrate my point about being able to expose a snake-less part of the head.
It sleeps in a seated position
There are a number of creatures that sleep standing up and humans can sleep while up right. It is not unreasonable for a Gorgon to do something similar. So when the Gorgon is ready to sleep they get in their favorite chair and simply doze off. Thus no additional weight is put on their head and so no source of pain or discomfort.
Their snake hair is a wig or retracts into the inside of the Gorgon's skull. The wig's lining is made from snakeskin discarded during the Gorgon's youth. If the snakes retract into the Gorgon's skull, they are responsible for protecting her brain. If the snakes are wig, the wig must be removed from the Gorgon in order to eat or excrete. Whether wig or retractable, the Gorgon sleeps well protected by snakes either peering out from her skull-holes or standing vigilant embedded in her nearby wig.