The appointment
Pick a slot. Fifteen minutes, the same time most days, not in the last two hours before bed and not in bed. Six o'clock, sitting at the kitchen table, is a real example that works for people.
Outside the slot, when a worry turns up, you write it down in a line or two and go back to what you were doing. You are not banning it and you are not solving it. You are giving it an address.
Inside the slot, you take the list and you worry. Deliberately, on purpose, for fifteen minutes. Most people find that about half the list has gone stale by the time they get there, and the rest is much shorter to think about than it was at midnight.
One honest note before you try it. The original study behind this is small and old. It is worth doing and it is not a cure.