I dont know why, but at Tenpines I have a problem with the existing shack that is there with a bed and sleeping back in it. All 12 of my settlers all pile in and stand there at night and watch two people sleep then rotate out on one mattress. This is despite me building a nice fancy 3 story compound for them with tons of beds.
I ended up ringing a bell to get them all out and built a little wood fence in front of the door so they cannot get back into the shack, but of course when I fast travel there the original two settlers are always somehow trapped in there lol