The cleanup step is the final step of the end phase, and under normal circumstances no player receives priority during it. Since casting a spell requires priority (CR 117.1), spells simply cannot be cast during a standard cleanup step.
During the cleanup step, two things happen automatically (CR 514.1, 514.2): first, the active player discards down to their maximum hand size; second, all damage marked on permanents is removed and 'until end of turn' and 'this turn' effects end. These actions happen without anyone receiving priority.
However, there is an important exception (CR 514.3): if a state-based action would need to be performed, or if any triggered abilities triggered during the cleanup step, the game does give players priority after those are handled. If that happens, players can respond — including casting instants or activating abilities — and then another cleanup step follows to handle any new end-of-turn effects.
Concrete example: Suppose you control a creature with a 'dies at end of turn' trigger that triggers during cleanup. That trigger goes on the stack, players receive priority, and you could cast an instant like Giant Growth in response before the trigger resolves. After the stack empties, a new cleanup step begins.
In summary: you cannot cast spells in a 'normal' cleanup step, but if a triggered ability or state-based action forces players to receive priority during cleanup, spells and abilities can be used at that point (CR 514.3).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.