Simply gluing in the inserts will frequently not solve the problem, if you used wood glue they sometimes will just pull right back out again. The inserts need to bite into solid wood to stay in place. Yours have pulled out and probably enlarged the hole beyond a simple glue solution, there's probably no solid wood for them to bite back into.
To correctly solve the problem you need to add fresh wood back into the hole and then press the inserts back into place. On a professional level that would typically be done by gluing a dowel rod into the hole and redrilling new correct size holes for the inserts. However, on a DIY level you can accomplish the same thing with nearly the same success rate by gluing a few toothpicks in each hole (wood glue works good, epoxy is permanent so I don't like it), then carefully pounding the inserts back in place, letting it dry overnight, replacing the bridge properly (see below), reinstalling your strings, and setting the action/intonation/tuning.
Note:
Proper bridge replacement means you do everything you can to avoid using the bridge as a lever to pull the inserts back out. That means that once you have the inserts in place and dried overnight you hand screw the bolts back into place and set the rear two screws to the lowest possible position (the rear of the bridge should be resting on the body or possibly the top of the inserts) while at the same time the single front screw is set about 1/4" to 3/8" of an inch higher. This sets the approximate correct relationship between the front and rear screws and if done properly will result in a bridge that is noticeably lower in the rear and raised in the front. You should do all this before putting strings on the bass.
Next you can restring your bass. Because you have set the rear screws on the lowest possible setting all further screw adjustments you will make will raise the bridge and put less stress on the inserts than starting high and tightening the screws would have done. Remember, if you raise the rear screws you should also raise the front screw by about the same amount to retain roughly the same relationship between the front and rear screws. As you're setting the action you may end up raising the bridge a bit too high and find that you need to back it down a bit - just remember, loosen the strings a few turns before lowering the bridge. Cranking those screws down while the strings are good and tight is the easiest way to pull the inserts back out of your bass.