Should we not sleep with our feet or head facing the door? & why?
There seems to be a custom not to sleep with one’s feet pointing towards the door, and it is said that the reason for this is that when a person who has passed away is lain awaiting burial, he is lain with his feet pointing towards the door of the room (see Gesher Hachaim I:3:2:2), and we do not wish to position ourselves when sleeping in the same position as the dead are positioned.(As such, perhaps this applies only when one is sleeping on the floor, and not if one is sleeping on a bed.)
As to why the dead are lain with their feet pointing towards the door, this may be an extension of the custom to bury people in the cemetery with their feet pointing towards the entrance to the cemetery, which Chasam Sofer (vol 2, Y. D. 332) explains is done as an indication of the faith that we have that there will be a Techiyas Hameisim (Resurrection of the Dead), as if to indicate that the dead will arise from their graves and leave the cemetery through the entrance to the cemetery.
There seems to be no reason not to sleep with one’s head towards the door.