It would depend on many factors.
For instance, if my spouse had a severe cold or the flu and I had a full-time job and/or young children to care for then I most certainly would prefer not to sleep in the same bed w/him while he is ill because it would be highly likely that I would catch what he had very soon.
But if he had the flu and I had already had a flu shot or if I didn't have young children to care for or a job outside the home that was not flexible, then I might chance it.