As you are doing your work with computers, a typical problem could be that you watch some light emitting screen before going to sleep, for example a Monitor or a Tablet, maybe phone. It is very bad, your body makes hormones that makes you fall asleep harder and makes your sleep inefficient.
Change this habit, you have to stop viewing screens at least 1 hour before going to sleep.
Additional problem with the screens that it may happen to boost your brain as you probably doing your work or reading something interesting. It does not help too.
You should take attention to feel yourself good mentally and physically too. You should do sports for at least 3 times a week for at least 1 hour to make you tired. It makes stress go away and makes you feel much better.
These are all factors that heavily affect your sleep quality and can balance your coffee problems - that was your question.
Anyway, you should start a program to get off caffeine as it may kill you in the long run and being dead or in a hospital is much less efficient than working a bit less or focused ;) - what can be solved by doing sports instead.