4 But he [Elijah] himself went a day's journey into the wilderness and came and sat down under a broom tree. And he asked that he might die, saying, 'It is enough; now, O LORD, take away my life, for I am no better than my fathers.' 5 And he lay down and slept under a broom tree. And behold, an angel touched him and said to him, 'Arise and eat.' 6 And he looked, and behold, there was at his head a cake baked on hot stones and a jar of water. And he ate and drank and lay down again. 7 And the angel of the LORD came again a second time and touched him and said, 'Arise and eat, for the journey is too great for you.' 8 And he arose and ate and drank, and went in the strength of that food forty days and forty nights to Horeb, the mount of God.
Like the cake God gives to Elijah, lembas sustains travellers. When the elves give it to the fellowship, they say, "One [cake] will keep a traveller on his feet for a day of long labour, even if he be one of the tall Men of Minas Tirith" (Book II, Chapter VIII). This is borne out at the beginning of The Two Towers where "Often in their hearts they [Aragorn, Legolas, and Gimli] thanked the Lady of Lórien for the gift of lembas for they could eat of it and find new strength even as they ran" (Book III, Chapter II). When they meet Éomer, he's surprised at the great distance they've covered in such short time. Aragorn, Legolas, and Gimli are able to sustain this pace because of the lembas in the same way that Elijah "went in the strength of that food forty days and forty nights."