I can't tell if this is an endorsement of or warning against using coffee to mitigate a lack of sleep, so I will take it as reinforcement of the former which I am currently (and unfortunately) a practitioner of.
Caffeine has a half-life of about six hours so it can affect your sleep without necessarily knowing it leading to bit of a vicious circle. If you are interested, Dr. Peter Attia has a three part episode with Dr. Matthew Walker on sleep. It changed the way I prioritize getting sleep.
If you want the best effects of caffeine you have to cycle it. Save it for those special occasions where the real positive benefits of caffeine can work for you and the negative long term effects don't work against you.