What to do as a Theoretical computer science PhD student in a free time?
I strongly agree with other comments that over-optimizing your time is not healthy and your brain needs downtime, preferably social interaction or physical exercise. However, if you feel you have that covered, what I think separates good from great researchers, is having an overarching vision; a generic direction, or specific goal to strive to. To see the forest for the trees, if you will.

One way to achieve this, is to reflect in those moments of spare time; to philosophize very generically on society and identify problems in it. This can range from wicked problems like climate change and inequality, to more practical problems like cybersecurity (e.g. Heartbleed) and software safety (e.g. the Toyota incidents). Don't worry about staying inside your field if things fascinate you. Read widely to find interests. Read popular media, popular science writing, quality newspapers and see what other people worry about. Read the solutions that are being proposed, evaluate their feasibility, and think hard to come up with better ones. Better ideas can make all the difference. For example, the Rust language is tackling the security and software safety issues commonly found in C infrastructure, the Julia language is focused on solving the two language problem in scientific computing and improving the state of the art in data science and machine learning, while Elon Musk's Tesla is aiming to accelerate the advent of sustainable energy in order to counter climate change. Each of these admirable projects started with good research ideas, by people committed to a higher level ideal. Finding your higher level ideal is what you should focus on.

A higher level goal will motivate you to get up in the morning, shape your career in a given direction and give you a sense of purpose and satisfaction. Most likely it is not something you'll settle on in a single afternoon. It is something that requires plenty of reflection, that can shift as your knowledge of the world shifts, changes as your priorities change. If you're ambitious, a good question to ask is "What will have the greatest positive impact on the largest amount of people?". Go crazy, get creative and consider scifi: "Maybe I should solve the inequality problem by writing a Decentralized Autonomous Organisation on Ethereum that unconditionally distributes a Global Basic Income to all." If, however, you are somewhat more realistically inclined, you might just choose to work on Blockchain tech because you believe in its huge potential for leveraging social benefit.

Maybe you are satisfied with something lower profile, that concerns you more directly, which is perfectly fine. What matters is that you find it valuable and worth spending your time on. These are the same principles successful entrepreneurs use to identify possible projects; two considerations are "Am I passionate about this?" and "What's the benefit to society?" The greater the benefit to society, the greater the market for it will be. A great researcher understands this, and chooses to accumulate expertise towards solving a general, overarching problem in his domain. This will have the largest impact both on his career, as well as society. Whatever you do, don't think a paper at a time, but see papers as building blocks towards an end, and take control of where you're going.