“flat (n.) 1801, “a story of a house,” from Scottish flat “floor or story of a house,” from Old English flett “a dwelling; floor, ground,” from the same source as flat (adj.). Meaning “floor or part of a floor set up as an apartment” is from 1824.” Online Etymology Dictionary