why not "walk into a train" ?
Trains, ships, and busses are a weird kind of middle ground between on/in.
Thinking about it, I believe the principal difference is if there is something significant (more significant than the roof of a train) above your head? It seems to be very subjective and though, any time I think I've gotten it figured out another example/edge case comes out.
From the socks perspective they are on you!