The earlier answers about this name were done before I had access to Ancestry library.
From a little research on Ancestry library, it seems that Almanzo as a given name in the USA is probably an alteration of Almanza. The first three males named Almanza in US Census records were born between 1795 and 1800. Within a generation, however, there were girls being named Almanza and Almanzo had appeared for boys. It looks like Almanza was originally used for boys, but then its -a ending lead some people to think Almanza should be feminine and Almanzo should be the "correct" male form.
Almanza is a Spanish surname and place name. There was a famous battle in 1707 during the War of the Spanish Succession called the Battle of Almanza. Perhaps some parents in the northeastern USA were reading about that battle and decided Almanza would make a good name for a son, as it was close in sound to other names like Alonzo and Lorenzo that had been adopted as male names in the USA. Perhaps someone just saw the surname Almanza in some news from Latin America and thought the same thing.
Since, as someone pointed out in an earlier thread, Almanzo Wilder seems to have actually been the first person in his family with that name, the "family legend" explanation that it goes back to an ancestor connected with Al-Mansoor seems more like a fanciful thing his parents told him rather than the real story. It's more likely they just heard the name in upstate New York, where they lived, since most early examples of Almanza or Almanzo are in New England, New York, or Pennsylvania.