It is inevitable that the koiguchi (mouth) of your katana’s saya will become loose due to frequent drawing and sheathing of the sword. It would be quite dangerous when this happens as the katana may slip out of the saya anytime and you may injure yourself or someone else.
The preferred method of repairing the koiguchi is to glue a thin piece of wood on the inside of the saya. Do not glue the thin piece of wood on the sides of the saya as doing so may crack the saya when you sheath back the sword. Gluing it on the lower or upper part is correct way.
DIY Saya Repair
You can then use a needle file or sandpaper to adjust the fit after you’ve glued the thin piece of wood. You can use bamboo strips or any type of thin piece of wood.