"Under the fiercest persecution these witnesses for Jesus kept their faith unsullied. Though deprived of every comfort, shut away from the light of the sun, making their home in the dark but friendly bosom of the earth, they uttered no complaint. With words of faith, patience, and hope they encouraged one another to endure privation and distress. The loss of every earthly blessing could not force them to renounce their belief in Christ. Trials and persecution were but steps bringing them nearer their rest and their reward. GC 41.1"
"(Of whom the world was not worthy:) they wandered in deserts, and in mountains, and in dens and caves of the earth."
Both passages describe faithful individuals enduring hardship and persecution, finding refuge in difficult circumstances (caves/earth). The EGW passage amplifies the general idea presented in Hebrews 11:38 by providing a more vivid description of the sufferers' attitude and experience.
"Like God's servants of old, many were “tortured, not accepting deliverance; that they might obtain a better resurrection.” Verse 35 . These called to mind the words of their Master, that when persecuted for Christ's sake, they were to be exceeding glad, for great would be their reward in heaven; for so the prophets had been persecuted before them. They rejoiced that they were accounted worthy to suffer for the truth, and songs of triumph ascended from the midst of crackling flames. Looking upward by faith, they saw Christ and angels leaning over the battlements of heaven, gazing upon them with the deepest interest and regarding their steadfastness with approval. A voice came down to them from the throne of God: “Be thou faithful unto death, and I will give thee a crown of life.” Revelation 2:10 . GC 41.2"
"Fear none of those things which thou shalt suffer: behold, the devil shall cast some of you into prison, that ye may be tried; and ye shall have tribulation ten days: be thou faithful unto death, and I will give thee a crown of life."
Ellen White directly references Revelation 2:10 in this passage.