From a Catholic prayer book:
Instructions and Devotions for the Sick, Dying and Deceased (p. 46):
“If you have not already made your will, as in prudence you ought, let this also be done in the beginning of your illness, so that having settled your temporal affairs, you may apply your soul without disturbance to the spiritual.”
Better to do it before you are "ill". If you die suddenly and without warning, you will not get the chance.
[Though they say the word "will", these days that includes not only your will, but Power of Attorney (legal/financial), Durable Power of Attorney for Health Care (rather than the so-called "living will"), and Guardianship for minor children. The last one being particularly vital, as good Catholic parents should not leave it to the courts to decide who will raise their children in the event of their untimely death.]