Packaging PCB and battery inside enclosure - foam
There are many kinds of foam and foam tapes. I suggest a foam tape stuck to the enclosure or the PCB. Here is just one of many, many types (a urethane foam). Other plastic foams such as polyethylene, vinyl and acrylic are available (and more exotic materials such as polyimide foams).  

It's up to you to evaluate the suitability of the material and the adhesive and the physical characteristics like thickness and so on for your application. 

You'd want to consider flammability and working temperature range as less obvious characteristics.