Contractures. Oftentimes people get pain to the bottom of the foot or to the achilles tendon area. This is a result of the plantar fascial ligament on the bottom of the foot or achilles tendon in the back contracting and then when you go to step and use them they are stretching. Often times, a splint is used to keep the ligament or tendon stretched so they don't contract in the first place.
Fluid dynamics. When you get out of bed or get up from sitting, similar things are happening in your feet. Areas in your feet that are already inflamed now begin to receive more blood your heart due to your standing as well as veins not clearing blood out fast enough. With your first steps, the added pressure cause pain. Further steps causes muscle contraction and deeper breathing reducing pressure and less pain.