When you first get out of bed in the morning or get up from rest after a while and there is pain under the heel that can be severe for the first few steps before easing off is a symptom known as poststatic dyskinesia. The word ‘poststatic’ means after being static (ie after rest) and the word ‘dyskinesia’ essential means that there is something wrong.
The most common reason of this pain when waking up and putting the feet on the ground first thing in the morning is a condition known as plantar fasciitis. The plantar fascia is a long ligament that attaches to the heel bone and to the ball of the foot, so its role is to help support the arch of the foot. It should not be hard to see that if there is some inflammation in that plantar fascia, just how much load the arch of the foot is placed under when you start walking on it and how it will be really hard on the plantar fascia. After a bit of walking it does ease off a bit as it gets used to those loads.
The best way to deal with this poststatic dyskinesia is to get treatment for the problem that is causing it. In the short term, stretching the calf muscles before getting out of bed can be helpful.