[assumption] Say Milotic used Sleep Talk while asleep and used Dragon Tail. Logically, it should go first but I'm curious.
It will go whever Milotic would go. Sleep Talk doesnt take the priority of a move chosen.