setFacingDirection

public void setFacingDirection(BlockFace face)

Set which direction the head of the bed is facing. Note that this will only affect one of the two blocks the bed is made of.