Systemic Lupus can cause both of these symptoms. I have had active systemic lupus for 10 years and often I have painful experiences with the muscles all over my body. Also on occasion I get painful rash's on my feet and I have had Toe nails fall off.
There are quite a few autoimmune disorders. Some of the ones that would cause foot and muscle pain are: multiple sclerosis, rheumatoid arthritis, reactive arthritis, and lupus.
Some of the autoimmune disorders which cause foot and muscle pain are: systemic lupus erythematosus, Polymyalgia Rheumatica, Rheumatoid arthritis, multiple sclerosis.
Dermatomyositis causes muscle pain with joint and foot pain in addition to a rash.
Lupus too can cause muscle pain and foot pain.
Rheumatoid arthritis can affect joints and muscles too.