For my Wife the answer was medication because she has ADHD.
I hesitate to share my own strategy it was very effective for me, but I don't know if it's for everyone. What I found worked well for me was to integrate video games into my study routine. I would play CSGO, when you die in CSGO you are dead until the end of the round, and queue times are ~5-10min. Anytime I wasn't directly paying in the game I would study, and I would play very aggressively so I would be more likely to die early. After a game I would take a 20min study break then reenter the queue and study until the game started. It's not the most time efficient, but it didn't feel like work for me like that so I could do it all night. great for easy but long tasks.
Sometimes I would also play single player games on a slow harddrive and play during the loading but that is probably not as effective as it once was.