A previous question asked the same of 'warm' in 'stay warm' but the single answer was not very satisfying to me and also 'put' is not the same as 'warm' even if, as the answer suggests, 'you' is implied by the invitation 'stay'.
The context of 'stay put' is that I saw a picture of a second world war bomb shelter in England and the last of the instructions was to : 10. Stay put.
It is an imperative, neither an invitation nor a colloquial farewell.
'Put' could be viewed as an adverb, modifying the verb 'stay'. One is to stay in a putly way, as it were.
Or 'put' could be viewed as the past participle and the idea is to 'stay' as one was originally placed. Stay as one had been 'put'.
The expression is imperative and it is more than an imperative for one is not only to stay, as such, one is to stay exactly there and not move. Or else.
I like the expression and had not seen or heard it for a while.
The Ngram shows that both AmE and BrE have a hump during the second world war, a decline thereafter and a rise since then, which is an interesting observation on post-war and modern attitudes, I would say (as a baby boomer).
So, what part of speech, may I ask ?