The OED says “The phrase is said to have originated in a toast proposed c1807 by the English banker and politician Sir William Curtis (1752-1829).”
This attribution is supported by the first citation:
1825 Mirror of Lit. 29 Jan. 75/1 It has been very much the fashion amongst a class of persons to attribute to Sir W. C. certain bulls… He is charged with having given, at public dinners, the following toasts:—‘The British tars of Old England’. ‘A speedy peace, and soon.’.. ‘The three R’s—Reading, Writing, and Rithmetic’.