Epsom salts can work very well - but if you have a magnesium deficiency, it's best to first figure out WHY you've got one... and that is usually linked to a pH issue. All nute lines will have sufficient magnesium in their components for the various stages so there's some reason, if you've got the deficiency, why your plant isn't able to take it up.. start there... if the pH is out of whack, you can give your plant all the magnesium in the world and it won't be able to access it.
good luck!