Sleeping in the same bed with hepatitis B is generally not contagious. Hepatitis B is mainly transmitted by blood, sexual contact, close contact and vertical transmission from mother to child, while ordinary life contact is generally not contagious, so sleeping in the same bed with hepatitis B patients is generally not contagious. If you sleep with hepatitis B patient, if you only have skin contact with each other, there is no hepatitis B virus on the surface of skin, so it is not contagious; however, hepatitis B virus can be transmitted through sexual contact, so if you sleep with the patient and have sex, you have the possibility of being infected. Hepatitis B vaccination is recommended to help prevent hepatitis B virus infection. Avoiding contact with the blood of hepatitis B patients and avoiding unclean sex can also help prevent hepatitis B infection.