The compound apple-pie order means perfect order or neatness. Its first known user was a British Royal Navy officer, Admiral Sir Thomas Pasley (1734-1808), in his journal in 1780:
Exercised Great Guns and small Arms as I constantly do every Tuesday and Friday, and fired Volleys; Wash and Fumigate, Wednesdays and Saturdays, Air Spare Sails on Mondays. The Officers muster the Cloths of the Men in their different divisions on Thursdays, and I their Persons Clean and in apple-Pie order on Sundays—thus with me every day.
Some of its early uses seem to indicate that apple-pie order was not common at the turn of the 18th and 19th centuries. For instance, in Rosella, or Modern Occurrences. A Novel (London, 1799), the translator and novelist Mary Charlton (floruit 1794-1824) wrote:
It was a neat little mansion, and every thing about it seemed, as Nancy said, in such grand apple-pie order, that it gave Rosella a strong idea of that extreme attention to cleanliness and form, which usually excludes ease and rest.
A parallel can be established between apple-pie order and apple-pie bed, denoting a bed which, as a practical joke, has been made with one of the sheets folded back on itself so that a person’s legs cannot be stretched out. (The French equivalent expression is un lit en portefeuille, where portefeuille has the general sense of document case and not the current restricted sense of wallet.)
It has often been said that apple-pie bed shows a folk-etymological alteration of French nappes pliées, folded linen, folded layers. This seems far-fetched, especially as French nappe denotes a tablecloth, not a bed-sheet.
A more convincing explanation is that the bed is compared to an apple turnover, a kind of pie made by folding a piece of pastry over on itself to enclose the filling. (In French, this kind of pie is un chausson aux pommes, the literal meaning of chausson being a slipper.)
It is therefore possible that apple-pie order originally referred to the regular order in which the component parts of some varieties of apple pies were formerly laid one on the top of, or side by side with, each other. For example, in The Lady’s Complete Guide; Or, Cookery in all its Branches (1788), Mary Cole gave the following recipes:
An Apple Pie
Make a good puff-paste crust, lay some round the sides of the dish, pare and quarter your apples, and take out the cores, lay a row of apples thick, throw in half the sugar you intend for your pie, mince a little lemon-peel fine, throw over, and squeeze a little lemon over them, then a few cloves, here and there one; then the rest of your apples, and the rest of your sugar [etc.]
Pare your apples, core them, and quarter them; lay some sugar at the bottom of the dish, then the apples, grate a little lemon-peel, some more sugar, then more apples, cover the dish with puff-paste [etc.]
The term mince-pie order had been used by the reviewer of Memoirs of the Chevalier Pierpont, volumes 3 and 4, in The Critical Review: or, Annals of Literature (London) of June 1764:
Amongst the many curious receipt-books daily published, we are surprised that none has yet appeared on the subject of romance cookery, which the author now before us seems to understand perfectly well. Through both the volumes, there is not a single original sentiment, description, or incident, and yet a callow reader may peruse it without perceiving any thing is wanting. The lady’s travels into Spain, Clarke’s account of that country, and the help of a large geographical dictionary, with a few romantic exaggerations, afford him materials for the descriptive and topographical parts. Felibien, de Piles, and a few other French translations set him up as a connoisseur in painting, and present him with anecdotes of artists. Rollin, Rapin, Du Bosc, and a whole legion of French writers, equip him for a critic. An eighteen-penny jest-book supplies him with wit and humour, and he can pick up divinity and morality from every stall. After all (to do our author justice) he shews himself a sufficient master of address by the mince-pye order in which he serves up his entertainment, which is sometimes so disguised, that at first we cannot discover the original ingredients.