Was it the Petrovaradin Fortress? It's definitely not straightforward Latin, but like brianpck said, it could be an abbreviation. It could be something else altogether (different language, secret code), but the various "travel sites" online back up the guide, at least:
Some of the interesting discoveries in the galleries were a Maltese cross, as well as evidence pointing to Masonic movements throughout the tunnels. Another one of Masonic emblems is “Ipam miam”.
This is an inscription used by alchemists and masons to mark doorways as a symbol that they are moving toward the Creator, moving toward something becoming out of nothing and vice versa.
Here's a video (with a time stamp) to the inscription, for those curious:
I don't see any academic articles discussing it (not on Google Books, not on JSTOR), and in fact there isn't much out there at all. You might have to consult an actual expert on Masonic codes or some scholar who has studied the Petrovaradin Fortress.
The whole "earth - wind - fire - water" thing sounds like nonsense. The main words for earth/ground are terra, humus, tellus, or solum, the first letter of which are not found at all in IPAM or MIAM. If there is a connection, it's likely to be a backronym, but I wouldn't trust Facebook.
Long story short: there's no information, and it's definitely not Latin. If it is an abbreviation, it would be very cryptic.