If afternoon coffee is pushing bedtime later, try swapping one cup for rooibos...
https://wiki-view.win/index.php/Why_does_coffee_feel_worse_on_an_empty_stomach%3F
If afternoon coffee is pushing bedtime later, try swapping one cup for rooibos or matcha