Give a stream of consciousness and then the final answer. "Nearer, My God, to Thee" is a 19th-century Christian hymn by Sarah Flower Adams, which retells the story of Jacob's dream. Genesis 28: 11 -- 12 can be translated as follows: "So he came to a certain place and stayed there all night, because the sun had set. And he took one of the stones of that place and put it at his head, and he lay down in that place to sleep. Then he dreamed, and behold, a ladder was set up on the earth, and its top reached to heaven; and there the angels of God were ascending and descending on it ..."

Based on this passage, who wrote the hymn nearer my god to thee?
The relevant information to answer the above question is: "Nearer, My God, to Thee" is a 19th-century Christian hymn by Sarah Flower Adams, which retells the story of Jacob's dream.
So, the final answer is Sarah Flower Adams.