There’s a fair amount of apparent discussion on optimal speaker height, so it’s interesting that a lot of people haven’t even considered if there’s an optimal height for their subwoofer too, which after all is just another type of loudspeaker.
Putting a subwoofer right on the floor or near the walls in a corner of a room can be perfectly fine to do, and many reputable manufacturers design their subwoofers for that and advise people to do that. Consider the following from the VP of acoustical engineering of Harman International:
“…where we place [a subwoofer] does matter. The least effective location is in the middle of a room. It gets better on the floor, still better on the floor against a wall, and best in a corner. This is ‘best’ in the sense of maximizing the quantity of bass radiated into the room.” (source)
But this can still potentially cause issues. If you have older and flimsier wood walls and floors, for example, it’s definitely possible for the room to pick up audible vibration and resonance. This is especially pertinent if you’re not on the ground floor with a thick foundation underneath – keep in mind you could be annoying people on the floor below you.
Walls can definitely affect and enhance the sound coming out of a subwoofer, but whether this is “good” or not is definitely subjective – it might give the explosions in an action movie a nice extra oomph, or it might just sound boomy and overpowering if you’re listening to calmer music.
An obvious limitation is that some subwoofers are just big and heavy, but they do make bigger speaker stands and/or blocks that you can put a subwoofer on. It’s definitely possible to rig up a DYI block as well.
Elevating a subwoofer 1-2 feet, or even a mere few inches, can definitely improve overall musicality, both by decoupling it from a vulnerable floor and putting the woofer at a superior listening height. Or might do nothing. Or it’ll make action movies and edm music sound worse. As is the case with so many nuances in the world of audio, the ultimate answer is a form of “maybe, it depends, try it different ways and see which you ultimately like better.”