What kind of air mattress? BA has both plain and insulated versions.

I would tend to put the foam on the bottom and the mattress atop it. My thinking is you will have a barrier at ground level and convection heat loss from the mattress would be mostly limited to the edges. If you flip the order then the mattress is free to conduct heat to the ground across its full area. I think it will also be easier to tweak the mattress volume for comfort when it's on top.

There could be an issue of them slipping against each other, but that you can experiment with to find out. Some mattresses have anti-slip bottoms.

My $0.02.
_________________________
--Rick