You do have to wonder about all those open rooms with no doors that the people of Skyrim call bedrooms. Luckily Jokerine has come to the rescue for us who prefer a more private setting when we are with the spouse or needing sleep.
This mod puts doors on the second floor of the HeathFires homes plus a wall that separates the first floor bedroom if you build one. Build everything in the first floor bedroom except for the table and chairs before adding this into your game.
Be sure to read carefully what he offers since you can make individual choices or get the complete set of doors and wall.