Sofa can't affect the function of the bed, after all, the most important thing in the bedroom is the bed. The layout between the bed and the doors and windows should be reasonable.
The bedside and sofa should be against the wall. It's especially good for the bedside to lean against a solid wall. Lying in bed, it is best not to put the sofa on a person's left hand side. The person sitting on the sofa should be able to face the door.
People should move the lines reasonably and don't walk back and forth around the sofa.