I always thought it was stalactite with a c and that meant it was from the ceiling. Stalagmite with a g meant it was from the ground. At least that was my way to rember it.
I was very young when I thought this up as a mnemonic, but I still use it, even though it’s so arbitrary as to be meaningless. I mean, perhaps the stalagmites need all of their might or something. It’s not terribly foolproof.
I learned it as, C comes before G, so C over G, or C / G. So, stalactites are the ones on top and hang down, and stalagmites are the ones on the ground and grow upward.