Plaster is the original material and the only one I would consider for a repair like this, I'm a woodworker and repair tools all the time.

The downside of the other materials suggest are eigher: won't hold well enough (foam tape), or will shrink as they dry (causing the glass vial to shatter) or would be impossible to remove and replace when the level goes out of true. If it's a level in a camera body there would be no way of repairing it aside from removing and making a replacement piece.

Plaster is easy to remove, just make sure that is 100% plaster of paris. A small pointed stick of wood and water to moisten the dry plaster will soften it, then it can be scraped out. It takes patience, but epoxy will ruin your piece (assuming wood).