My theory

The boat (therefore bed) as it travels through the swell will have three main motions, pitch (bow up down), roll (port/starboard up down) and heave (whole boat goes up and down).
Depending on the point of sail the boat could pitch more than roll or roll more than pitch, or any combination of the two. If the course of the boat takes it through every direction of wind and swell then no matter which way the bed lies it will sooner or later move in every direction too. So my theory would be it makes no difference unless it's a really long voyage with a prevailing swell. In that case you could orientate the bed so that "most of the time" it moved in a direction you preferred. Either with less pitching or less rolling. But that's subjective because my kids liked maximum pitching and rolling not less

The location of the bed is important though. In the center of the boat the motion is less, like sitting in the middle of a plane. And as mentioned already usually the stern is way quieter for a berth at sea or at anchor since it doesn't have the waves hitting the hull next to your head. Or the anchor pulled up or down right next to your head. I noticed how great that was when switching to centre cockpit boats with an aft cabin.