Sleeping near someone you're closed to whether it be friendship or relationship can cause you both to experience the same dream.