If you're using the fridge to treat illness, it's usually more like a week or two, up to a month in some cases.
The purpose of putting an axolotl in the fridge if it's not eating is so that its metabolism slows down and it doesn't starve to death. You would need to keep it in there (or somewhere else rather cool) until it started eating again.
However, it's not unheard of for axolotls to go stretches of time without food. Mine have occasionally gone for up to a month without food, on their own accord. A better option would be to keep it somewhere cool, but not COLD, as they tend to not eat while in the fridge.