I must admit I drink nothing BUT coffee
I've never had any problems or adverse side effects. If I wake in the night, which is quite rare, I will come down, have a coffee and a ciggy then go back to bed and drop off no bother so it doesn't even keep me awake.
BTW The reason a lot of painkillers contain caffeine is because it makes the painkiller itself more effective.
Must go, kettle's just boiled