There is a couple conditions needed for sims to sleep in the same bed.
First the duh factor...the bed has to be a double bed.

The short term relationship and long term relationship need to be high enough. I don't recall what the numbers are.
If you are using a reserveable bed or Twojeffs Smart Beds, the sims must have "ownership" of one side or the other of the bed.