C Wilson Meloncelli speaks a bit about this in his introduction to the flow state. Some people use the word autotelic (eg autotelic personality) to describe this, as in doing something for the pleasure of doing it. In the introduction to the The Rose Garden Game by Eithne Wilkins I remember reading about a toast to pure scholarship “may it never be of any damned use to anyone” that kind of epitomised this in a comical way (also comical because it was in a book about a cross cultural practice that is often used to get people in the flow, ie rosary beads).
The point he was making when referring to autotelic personality and the flow state was to pick the right activities for you that allow you to engage just for the sake of doing them, focusing less on the outcome. The neurology of the flow state involves dopamine and norephinephrine which create that strong engagement with the task at hand, so you want to find a way to train that state by first getting into it with training wheels so to speak, and learning how it feels to move in that direction.
Another interesting thing Meloncelli talks about which is probably more relevant to this forum is about accessing the flow state via the backdoor by bringing yourself into contact with the subconscious mind.