"chief support," 1787, a figurative use of a nautical noun meaning "stay which extends from the main-top to the foot of the foremast" (late 15c.), from main (adj.) + stay (n.).
Entries linking to mainstay
main adj.
early 13c., "notably large, bulky, or strong" (a sense now obsolete), from Old English mægen- "power, strength, force," used in compounds (such as mægensibb "great love," mægenbyrðen "heavy burden;" see main (n.)), probably also in part from or influenced by cognate Old Norse megenn (adj.) "strong, powerful, mighty."
Sense of "chief, principal, prime" is from c. 1400. That of "principal or chief in size or extent" is from 1590s. Main chance "opportunity of enriching oneself" is by 1570s, from the game of hazard. Main course in the meal sense attested from 1829. Main man "favorite male friend; hero" is by 1967, African-American vernacular.
stay v.1
mid-15c., "cease going forward, come to a halt," also (transitive) "detain, hold back," from Old French estai-, stem of estare "to stay or stand," from Latin stare "to stand, stand still, remain standing; be upright, be erect; stand firm, stand in battle; abide; be unmovable; be motionless; remain, tarry, linger; take a side," (source also of Italian stare, Spanish estar "to stand, to be"), from PIE root *sta- "to stand, make or be firm." Sense of "remain" is first recorded 1570s; that of "reside as a guest for a short period" is from 1550s. Related: Stayed; staying.
Of things, "remain in place," 1590s. Stay put is first recorded 1843, American English. "To stay put is to keep still, remain in order. A vulgar expression" [Bartlett]. Phrase stay the course is originally (1885) in reference to horses holding out till the end of a race. Stay-stomach was (1800) "a snack."