The Tur and the Shulchan Aruch wrote in section 2: A distance of a mil and any amount of sleep dissipate the wine. And these words apply when he drank a revi'it, but if he drank more, certainly (a little) sleep increases his intoxication and travel disturbs him. And these words apply to one walking on his feet, but for one riding, travel certainly dissipates the wine. Thus far his words; and the Tur brought this from the Bahag. And all the great authorities raised a difficulty, for in Eruvin (64b) it is explicitly proven that for one riding, three milin are required, see there. And many things were said regarding this. And regarding the halacha, for a revi'it, a mil is sufficient, and for more than a revi'it, one must require three milin (Eliyah Rabbah, and so it is implied in the Magen Avraham, subsection 5). The Rif and the Rosh did not mention at all the distinction between riding and walking. And it seems to me that they hold that according to the conclusion of the Gemara in Eruvin there—there is no need to distinguish between riding and walking, see there. (And so wrote the Korban Netanel there. And the words of the Taz, subsection 2, who wrote that they hold that riding a mil does not help—is astonishing, for if so, it is obvious they should have stated this explicitly. And so the Rambam in the first chapter of Biat Mikdash did not mention this distinction. And it is a wonder that the Rambam did not write this law at all in the laws of prayer. And perhaps he holds that specifically regarding Biat Mikdash, where he profanes the service and is liable for death—one must be precise in this. But regarding prayer, whenever it appears to him that his wine has left him—it is permitted to pray. Examine and you will find it easy.)
כתבו הטור והשולחן ערוך סעיף ב: דרך מיל ושינה כל שהוא מפיגין את היין. והני מילי כששתה רביעית, אבל אם שתה יותר כל שכן ששינה (מעט) משכרתו ודרך טורדתו. והני מילי במהלך ברגליו, אבל רוכב וודאי דרך מפיגה היין. עד כאן לשונו, והטור הביא זה מבה"ג. והקשו כל הגדולים דבעירובין (סד ב) מוכרח להדיא דברוכב צריך שלושה מילין, עיין שם. ודברים רבים נאמרו בזה. ולענין הלכה ברביעית די במיל, ויותר מרביעית יש להצריך שלושה מילין (אליה רבה, וכן משמע במגן אברהם סעיף קטן ה'). והרי"ף והרא"ש לא הזכירו כלל החילוק שבין רכוב למהלך. ונראה לי דסבירא להו דלמסקנת הש"ס בעירובין שם – אין צורך לחלק בין רכוב למהלך, עיין שם. (וכן כתב הקרבן נתנאל שם. ודברי הט"ז סעיף קטן ב', שכתב דסבירא ליה דלא מהני רכוב מיל – תמוה, דאם כן פשיטא שהיה להם לפרש כן. וכן הרמב"ם בפרק ראשון מביאת מקדש לא הזכיר חילוק זה. ותימא שהרמב"ם לא כתב כלל דין זה בהלכות תפילה. ואולי סבירא ליה דווקא לענין ביאת מקדש, דמחלל עבודה וחייב מיתה – צריך לדקדק בכך. אבל בתפילה כל שנראה לו שסר יינו מעליו – מותר להתפלל. ודייק ותמצא קל.)