The problem with doing nothing is not knowing when you are finished.
The joke turns on a small paradox. Work has natural endpoints, like a finished report or an empty inbox, but idleness has none. When you are doing nothing, there is no task to complete and no signal that tells you that you may stop. Rest can then slide into restlessness or guilt. DeMille is best known for thrillers with dry, sardonic narrators, and the line sounds like that voice: a wisecrack with a real observation tucked inside. It is widely credited to him, though I wouldn't lean on any precise source.
Beneath the humor sits an old idea found in many traditions, from the Sabbath's fixed day of rest to the Taoist praise of effortless non-action: genuine rest needs a shape. Without one, we tend to treat it as wasted time and fill it with scrolling, which isn't doing nothing at all, only busyness in disguise.
A practical way to use this is to give your idleness a boundary. Next Saturday, decide that you will sit on the balcony with a cup of tea, phone in another room, until the cup is empty. The tea becomes your finish line, so you can relax without wondering whether you're doing it right. When the cup is empty, you know you have actually rested.