Some medicines you have to take on bed time, some early morning empty stomach. It has to be taken according to the direction of physician.
As you are complaining from acidity you can take medicine half an hour before food.
Every time just keep a minimum gap of 15 min, either before or after food
Next Steps
if you have any queries you can consult via practo