That particular story emphasizes the importance of getting enough sleep. Elijah had obviously been overworked at that point and had overestimated his own self importance. Once fatigue set in, fear came upon him. God let him know that he could easily be replaced if he continued to operate out of fear instead of faith.
Think about it. Elijah had just killed all the prophets of baal by himself, climbed a mountain, and then outraced a chariot. The boy was in desperate need of a good night's sleep.