say that I, for educational purposes, want to use \showframe for a couple of pages, and then want to hide the frames. What is the correct way of doing this? I have for now added a \begingroup and \endgroup, but then another document parameter that is set inside is cancelled after the \endgroup.

I tried to look in the source, but could not find anything that worked (what I tried with was to use \setupbackgrounds[state=stop], but that was merely a guess, and it did not work).