Regarding the mathematical usage of magma, it seems that the origin is the "Bourbaki circle", but it is not so easy to trace exactly the date ...
The first English translation of Nicolas Bourbaki, Algèbre: Chapitres 1 à 3 (1970) dates the first pubblication to 1943.
As you can see, the definition of magma is the first one (page I-1), under the heading : 1. Lois de composition.
The corresponding draft (rédaction n°033 bis : what date ?) does not have the term magma.
I'm not able to find a copy od the original French edition; thus, I'm not able to check if the term was already there. It seems not ...
According to Hubert Kiechle, Theory of K-Loops, page 23 : the term magma was introduced in the 1970-edition of Bourbaki's Algebra.
We have also a review of the 1970 edition that seemingly alludes to magma as a "new entry".
For sure, the term is used by Serre in 1964 : Jean-Pierre Serre, Lie Algebras and Lie Groups: 1964 Lectures given at Harvard University, page 18 : 1. Free magmas.