Comment by Tagbert
“To Turn the Tide” by S.M. Sterling is a story positing a small group of modern people transported to the time of Marcus Aurelius and bringing modern technology ideas to prevent the Germans from degrading the Roman Empire. They don’t really try to explain how the time travel happens. It’s done in the first few pages with out explanation.
This plot device is known as a "time slip": https://en.wikipedia.org/wiki/Time_slip
Which is also the alternative title of the Sonny Chiba film "G.I. Samurai" (1979), in which a few dozen Japanese Self-Defense Forces soldiers find themselves in the 1560s.