Almond Milk for cow's milk was a really common substitution in medieval recipes. A lot of medieval recipes used almond milk - almonds being a lot easier to store without spoiling and find reliably when a medieval cook needed some.
Almond milk was a staple of the medieval kitchen. It was used in a wide variety of dishes as a substitute for milk or cream, especially on "fish days", when the church placed restrictions on what foods could be eaten (the most prominent of which were the days during lent).
In the Middle Ages, animal milk was, of course, not refrigerated, and fresh milk did not stay fresh for long. Most cooks simply did not use much milk as the short shelf-life of the product made it a difficult ingredient to depend upon... Rather than animal milk, Medieval cooks turned to something they could depend upon, and that was the milky liquid produced by grinding almonds or walnuts. This liquid, high in natural fats, could be prepared fresh whenever needed in whatever quantities. It also could be made well ahead of time and stored with no danger of degeneration. Because of its high fat content, it, like animal milk, could be churned into butter, and because it was not animal milk, it could be used and consumed during Church designated meatless days.
Some dishes cannot be made with this substitution, those that depend on the physical and chemical properties of milk - like cheese, or whipped cream. It would take a lot of processing and additives to make the almond milk mimic those products. However, both milks contain fats, proteins, and sugars in solution, and so behave similarly enough in the chemistry of cooking to make them easy substitutes.
I will admit that while I cited medievalcookery.com and godecookery.com because the quotes were convenient, I posted my comment originally drawing from David Freedman and Elizabeth Cook's "How to Milk an Almond, Stuff and Egg, and Armor a Turnip: A thousand years of recipes" which is very well researched and contains a number of period citations and recipes.