There is memory foam and memory foam. Be sure to find out what you're buying. If they are inexpensive I suggest that they are not truly memory foam. A memory foam mattress is very heavy. Again, if they're light weight they're likely not memory foam.
If you have slats layed perpendicular to the side pieces of the frame then you don't need box springs. My grandchildren have a loft bed and a bunk bed set and they have the slats about 3 inches apart and use only a mattress. They have foam mattresses which are different than memory foam. They've held up well, lasting 8 years of so. One, we bought from Ikea.
The other mattress is called a bunk bed mattress. It's not as thick. It's firm and very light weight and flexible. It's solid foam and was used when my daughter, their mother, was a child. Kids are so light weight that mattresses last longer. This mattress was around $50 many years ago. I've seen similar ones a couple of years ago for less than $100.