Theoretically, the bedside is generally against the wall. But this is not absolute. It depends on how you say it. There are specific stresses. It depends on how much space there is between walls and whether there is no gap between walls. It is unreasonable to consider the wall only from the practical point of view, not from the perspective of geomantic omen. Any movement on the other side of the partition wall will be particularly clear. Sleeping at night will be disturbed. In fact, any wall is not a seamless wall. So if you want to lean against the wall, you should also grasp the distance.
Since you have such doubts, it shows that you still care about things like Feng Shui. It's best to change the bed, which is good for feng shui and health. If you really can't do it well, you can consider making a "wall" artificially. This cost is not high, and the benefits are indeed quite a lot.