I mean its origin would be traced back to the Italian Peninsula.
If you've ever heard the song "Yankee Doodle Dandy", you've probably wondered why he thinks a feather in his hat is "macaroni". In the song it's actually referring to a group of fashionable young men (much like we have hipsters/yuppies/emos/etc. today). This group originated from young English men who would travel the continent. They often ended up staying quite a while in Italy, bringing back not only Italian fashions, but Italian food. There are also dozens of portraits of English gentlemen in front of fake Pompeiian sets. They began meeting back in London to share their interests and became termed for their love of pasta dishes, particularly macaroni.
Recipes for adding a cheese sauce can be found in English culture as early as 1769 in Elizabeth Raffald's The Experienced English Housekeeper. In American culture Thomas Jefferson is a notable figure, bringing it back from his time in Europe in much the same way as the English Macaronis. He even had the American ambassador purchase a macaroni making machine and served a macaroni pie at a state dinner in 1802. It's found in numerous variations in cookbooks throughout the 19th century, moving into the middle class diet.