How to wait in a rule?

It is ALWAYS a bad idea to have long waits.

If the wait is very short or if you understand your Rules well enough to know with certainty that you will not have Thread::sleeps piling up upon each other causing you to run out of execution threads. Those users who know and understand their rules well enough to use long Thread:sleeps are experienced enough and knowledgeable enough to understand the risks they are taking and how to recognize and solve problems when they arise. For the rest of us (myself included because I would rather avoid the potential problem in the first place) we should be using Timers.

This is a good case where Thread::sleep is appropriate. I even wrote a design pattern (Design Pattern: Gate Keeper) on that problem and I do use Thread:sleep. But it needs to be short.

You should be able to do something like this which uses Design Pattern: Expire Binding Based Timers and Design Pattern: Recursive Timers.

Switch LitterCleaned
Switch LitterTimer { expire="2h,command=OFF" }
rule "Litter reminder"
    Time cron "..." or
    Item LitterTimer received command OFF
when
    if(LitterCleaned.state != ON)){
        // send notification
        LitterTimer.sendCommand(ON)
    }
end

rule "Litter cleaned"
when
    Item LitterCleaned received command ON
then
    LitterTimer.postUpdate(OFF)
end

rule "Reset LitterCleaned"
when
    Time midnight
then
    LitterCleaned.sendCommand(OFF)
end