Yes, you certainly can. It's happened many times in history, thanks to hereditary rule (i.e., they inherited these positions, they didn't actively seek them). Queen Elizabeth I of England reigned for 40 years and is considered by historians to be a very good ruler. Marcus Aurelius of Rome was also considered very good.
The problem wasn't these rulers, it was what happened after they got old and died and their shitty kids replaced them.