The first, or the second.
The basic (present, positive) form is I do X in my spare time.
So the past is I did X in my spare time.
In a direct question (or a negation) you need the auxiliary do to invert:
What do you do in your spare time?
What did you do in your spare time?
But in an indirect question, there is no inversion, so no requirement for do support:
He asked what I do in my spare time.
He asked what I did in my spare time.
Both of these are fully grammatical and natural: the first implies that this is recent, because the expectation is that whatever I did when he asked, I still do it. The second does not have that implication: it could be referring to a past time. But it doesn't have to be - it could be recent as well.
Your third option is dubiously grammatical, but it is common in casual speech:
He asked what did I do in my spare time.
This does not obey the rule above that in indirect questions the subject and verb are not inverted. Nevertheless, people say it. I suspect that it is a blend of the quoted direct question He asked "What did you do in your spare time?" and the indirect He asked what I did in my spare time"