That depends how far you want to go back :)
Wikipedia references Buddhist and Taoist texts that are literally NNNN BC. I would say though that what we call "flow" in a refined scientific sense was a product of "positive psychology" studies in the 1980s. Positive psychology is the opposite of diagnosing people with disorders, rather helping them find ways to avoid bad states and generally improve patient well-being.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.