is it a bad idea to drink tea before going to bed since you may wake up needing to use the restroom?

Rashmi X.
I believe that drinking tea before bed could mess with your sleep, as it may contain caffeine, and also large quantities of tea might wake you up later on, to use the restroom. Apparently, drinking chamomile tea, 45 mins before going to bed, induces sleep. So, maybe, that's the only exception?