Assuming you are asking if it is safe to sleep in a room with the door closed, the answer is yes. There is no need to worry about lack of oxygen or carbon monoxide poisoning as long as there are no other sources of these gases in the room.