The mental state of flow was first studied in depth by psychologist Mihály Csíkszentmihályi.