Something about tying ('staying') the ship's wheel. I was wrong, if the OED is right. It seems likely they're right.
"Sport. To last, hold out, exhibit powers of endurance in a race or run. Also, to hold out for (a specified distance)....
(apparently first noted in 1834)
"1834 DARVILL Race Horse (1846) II. 44 If he finds that his horses can go faster and stay longer at the pace by being drawn fine. 1860 ROUS in Baily's Mag. I. 18 There is another popular notion that our horses cannot now stay four miles. 1871 M. COLLINS Marq. & Merch. III. iv. 114 Such a galloperand can't he stay! 1874 Slang Dict. 309 Stay, to exhibit powers of endurance at walking, running, rowing, etc. 1889 The Pauline VIII. 39 The Indian Civil boat made a good race of it for half the course but could not stay. 1897 Allbutt's Syst. Med. II. 841
may enable a man ‘to spurt’ but not ‘to stay’."
" to stay the course: to hold out to the end of a race. Freq. fig.
"1885 Daily Tel. 11 Nov. 3/7 Doubts are also entertained..concerning her ability to stay the course. 1916 Times 8 May 9/1 If we are to ‘stay the course’ set before us, other sections must be prepared for greater sacrifices. 1939 A. HUXLEY After Many a Summer I. viii. 103 ‘Do you suppose you'd still be a scholar and a gentleman?’.. ‘One will certainly have stopped being a gentleman,’ he answered. ‘One's begun to stop even now, thank heaven.’ ‘But the scholar will stay the course?’ 1966 Listener 10 Mar. 365/3 There was much to be learnt from this programmeabout metal fatigue, for instancefor those who could stay the course. 1983 Verbatim IX. IV. 16/2 When President Reagan exhorted Senators and Congressmen to stay the course, the actual meaning of his words was the opposite of his intended meaning."
OED claims it's ultimately a variant of
"quasi-trans. To remain for, to remain and participate in or assist at (a meal, ceremony, prayers, etc.); to remain throughout or during (a period of time). = stay for, 14a.
"1570 in Kempe Losely MSS. (1836) 234 At the tyme poynted he cam and stayd the service, from the beginning to th'end. 1599 HAYWARD 1st Pt. Life Hen. IV, 26 The rest of the lords departed, except the Earle of Darby, who stayed supper with the King. 1661 P. HENRY Diaries & Lett. (1882) 85, I stay'd ye sermon. a1700 EVELYN Diary 29 Nov. 1661, My Lord Mordaunt, with whom I staid the night. 1778 F. BURNEY Evelina (1791) I. xx. 87 We intended to stay the farce. 1786 Diary 27 July (1842-6) III. 37 At the dessert I was very agreeably surprised by the entrance of Sir Richard Jebb, who stayed coffee. 1808 JANE AUSTEN Lett. (1884) I. 357 She stayed the Sacrament, I remember, the last time that you and I did. 1832 MOORE Mem. (1854) VI. 244 Went to Bowood, and stayed prayers. 1862 CARLYLE Fredk. Gt. XI. iii. (1872) IV. 51 A certain Colonel..contrives to get invited to stay dinner. 1888 G. GISSING Life's Morning II. xi. 135 I'm obliged to ask them to stay tea."
Sounds like it's roughly equivalent to the more current "go the distance".