If this is happening accidentally and rarely, you need not do anything to stop this. In case this is happening frequently, it can be due to abnormal teeth position. Get it checked from a dentist, if this is happening regularly.
Usually these ulcers are painful, but will go away by themselves.
Next Steps
Apply Dologel 3 times a day, 5 minutes before taking food. Then wash your mouth and consume food. This will help you to have your food comfortably.
Apply a gel by name Rexidine twice daily for faster healing.
Health Tips
Do not drink or eat anything for 1 hour after applying Rexidine gel.