Pain in back of ankle when getting out of bed 3 days ago. Now swelling and pain in back of ankle an up to knee. What could be wrong?

Many possibilities. You could have strained a muscle in your calf, or even a partial tear of a muscle. One major concern with calf pain and swelling is a blood clot. Get it checked out.
Achilles Tendon. It sounds like you have injured, strained or partially torn your Achilles tendon. You need to stop all activities immediately. Get ahold of some crutches and visit a specialist to evaluate the nature of the initial problem as well as any compensatory problems that may have developed since the initial episode.