I don't agree with the two previous posts, caffeine and stimulants in general are exactly what you should avoid.
Caffeine as a stimulant is a very bad choice if it has to be taken before every workout since it develops tolerance in that regard, it is great only for whom never gets any form of caffeine and needs a boost once in while for specific events (competitions, for example).
The answer to the issue has probably already been given: "...have sleeping problems only sleep for a few hours not the full 8 as I use to years ago".
This leads to high cortisol which is antagonist of testosterone and I wouldn't be surprised if testing those two reveal high cortisol and low testosterone, not exactly the best condition for energetic and motivated training.
Reduced sleep has surely to be fixed or anything else makes no sense, caffeine in this regard wouldn't be a smart choice.
Why do you have sleeping problems is the real question.
I might sound redundant but thirst thing in this cases I suggest to look into thyroid function, especially if cold is annoying (cold hands and feet), poor skin and hair conditions, low energy in general (besides training).
To develop mild hypothyroidism is such a common thing it is sure enough worth to check it out.
I might suggest to check your basal temperature, that is done placing a thermometer besides the bed and to check the temperature first thing as you wake up, before moving at all (just grab the thermometer), if it shows below 36,5 chances you suffer hypothyroidism are likely quite high, it may be worth to repeat the procedure for a few days just to make sure.
Hypothyroidism not only affect your sleep but the whole hormones balance as well, of course.
There might be other causes for disturbed sleep patterns but I consider checking first for hypothyroidism mandatory.