That might work out for Ilford products developed at the regular 20°. But it is a bit of a simplification and could be risky under different conditions.
In general, what matters is the downward temperature step within one water change - too big a temperature drop will cause reticulation, a coarse grain-like shrinking of the emulsion layer. In my experience 5° down in one single increment won't matter with hardened emulsions late in the watering stage, but it is already unsafe for soft films or in the dev->stop or dev->fixer step (where the pH change creates a additional reticulation risk). Make it a maximum of 2°C down per bath change and you are on the safe side - perhaps even less if you are operating at a base temperature higher than 24°.
Theoretically you would be absolutely safe gradually shifting from 38° development to a 5° wash in 15 water changes with about 2° drop each (not that you'd want to, at 5°C washing will take ages to complete), while going from moderate 23° to moderate 16° in one change will probably reticulate your film visibly.
Upward changes are harmless as long as they don't have you end up past the maximum safe temperature (about 30°C for unhardened or 45°C for hardened emulsions) - if you keep below that, even a single-step upward change of 10° won't harm the film (as long as you remember that going down again would take you five steps).