Reducing total caffeine intake has improved my sleep quality, but I find there are diminishing returns to making it nil consumption. My sweet spot is a single small cup of tea or coffee in the morning. Research suggests that some trace amounts of caffeine can remain in your system many hours.