The re-definition of pin's drive mode can be made with the pin's APIs, but to cut and re-enable the hw-connection is not as easy. You have a choice to "Enable wakeup from Deep Sleep Mode" when configuring the UART. Doesn't that do what you want to perform?
Unfortunately not. The PSOC device is used a touch detect IC on my board. It uses UART to notify the Main processor that a touch has occurred. When the device is in power down, the psoc needs to set a latch on receiving a touch. But because the Tx signal stays high I need to reconfigure the pin to a digital output driven low. This way it can keep the other device powered off until it receives a touch and it then goes high to power up the other device.
I only have the UART lines connected to the device so I've no other choice at the moment but to reconfigure the UART to a GPIO.