By Nightcrawlers, I'm assuming you mean composting worms, such as European or African Nightcrawlers and NOT burrowing worms as Canadian Nightcrawlers, but either way :)
I teach worm composters to start out mimicking nature, then they can take it where they want to after they get a good understanding of how worms feed and the best food regiment for your situation.
Sometimes things can become out of whack when we try to do things a little different.
Remembering how nature works and going back to how they started out in the beginning is the best way to correct anything.
However, I'm not quite sure about your situation and WHY your worms are trying to escape.
Giving them the perfect environment will assure they stay withing the bedding. This is mainly about food, moisture, oxygen, temperature, and sometimes darkness or making sure it IS dark.
I talk in great detail about all of this in the free guide and Worm Farming Revolution book.
Sometimes you WILL get a straggler because they can be migratory (but not in mass), but usually if the lid is off, the environment outside the bedding is absolutely NOT beneficial for them and they KNOW IT!
If their environment is favorable, they will immediately turn around and stay close to or go down into the bedding, again if conditions are right.
So, using the Vaseline for Keeping Nightcrawlers from Escaping I have not heard that it hurts them. I don't use this method, but I also won't tell you that you can't :)
Try the natural alternatives and just make their environment as pleasant as possible should work.