It depends a bit on the positions of the door, the bed and the windows.
It might be nice to paint the wall that you see when you enter the room – then your mood is set right away, when you enter the room.
If your windows are there, choose the wall behind the bed, to create a 'decor' for your bed.
If you like to spend time in bed, to read or relax, you might consider choosing the wall you look at, when you are IN your bed.
Good luck with your painting job! Happy new year, Evelien
Yes it matters which one it is. It depends which one you see first entering in room.