The only reason I am awake from drinking coffee is the need to release it from my bladder during the night, if I have drunk it late at night. I always hope it might keep me awake if I have something to do late - like watch a meteor shower - but I don't really think I notice a lot of difference. I drink real coffee as I prefer it to instant but as I have drunk it from childhood, I don't think it affects me much.
I don't like coffee so l don't drink it. Tea is pretty high in caffeine as well, unless you have herbal teas. I will drink tea at all hours of the day or night with no effect. I look forward to my late night cuppa after dinner, knowing full well that it will have no effect on my sleeping whatsoever. In fact, tea relaxes me. If I can't sleep, I sometimes get up and have a cup of Tea, and it does the trick. I sleep pretty well most of the time, and what I drink has nothing to do with my sleep ( apart from sometimes having to go to the toilet afterwards).