@ysmina-- It actually depends. Edema which is probably what you had, is different from swelling caused by an injury. If injury is the cause of swelling, the first treatment should be RICE (rest, ice, compression, elevation). After the initial swelling has gone down, heat compresses could be used after a few day to treat the pain.
When the issue is edema due to sitting for too long, medications or other health conditions, heat can be used. Your mom gave you great advice about the Epsom salt foot baths though. Epsom salt baths are great for general swelling and edema. I use them for swollen and tired feet as well.