Really stuck in the schema, wondering when I'mma rest
He’s stuck wondering when he’s going to die.
The enunciation of I'mma rest here sounds like it has the word arrest in it, which gives the line another meaning; i.e he doesn’t know when he might get arrested.
A schema is a psychological term for the category of thought we immediately put our experiences into. This happens automatically, and it’s a hard habit to shake — hence why Kendrick is “stuck” in the schema (he also explains earlier how this shit becomes routine). In his case, the schema is death: he’s been exposed to so much dying that he routinely interprets his experiences through the thought category of death.
To help improve the meaning of these lyrics, visit "Sing About Me, I'm Dying of Thirst" by Kendrick Lamar Lyrics and leave a comment on the lyrics box