Hyperbole is an exaggerated statement or claim that isn't meant to be taken literally but is used for emphasis or to convey strong feelings or impressions. In the text you've provided, the phrase "certain I could sleep for days right there in the grass" serves as a hyperbole.
The role that hyperbole plays in this context is to emphasize the speaker's extreme exhaustion and the overwhelming sense of fatigue they feel after crossing the finish line. By claiming they could sleep for days, the speaker highlights just how draining the experience was, suggesting not only that they are tired, but that their need for rest is so great it exceeds the ordinary expectations of weariness. This exaggeration effectively conveys the intensity of the moment and allows readers to understand the depth of the speaker's exhaustion. It evokes an emotional response and paints a vivid picture of the physical toll that the event took on them.