I don't know how long the system lets you wait to make this change. Two reasons not to wait until the last minute:
1. You may miss the UG and end up in a crappy seat in Y (you'll get whatever's left at that point).
2. AFAIK, you can switch to another flight depending on availability. So if a flight is full or oversold, I don't think that will be an option for you.