The Root of the Behavior
A puppy or unfamiliar dog introduced to the house will often go through a period where they can be frightened by the human companions. This often takes a bit of time to overcome, but just your natural interactions with the dog should be enough. This behavior is caused by an unfamiliar environment and higher stress levels. Dogs can also be known to grow more calm and affectionate in response to their human companion becoming sick and weak. They recognize the frail nature and will often try and nurture and accompany their companion during this time. Canines can also be trained to be more affectionate and much of this training occurs in the process to ready a canine to be a therapy, support, or special needs dog. This training is often needed due to the human's constant reliance on a highly affectionate and attentive canine. Your dog showing a higher level of affection then normal should not be cause for concern unless it is coupled with additional symptoms. If they are growing weak or easily fatigued they may have some underlying medical issues.
Encouraging the Behavior
Taking your dog through the steps to certify as a therapy dog would include this type of training however a local dog trainer could address this themselves. A primary contributing factor is going to be exercise. If they are full of energy and cannot sit down then you cannot reasonably expect them to sit down with you. Making sure to get them enough exercise is going to calm them down around the house and with the reduced energy they may just be more prone to affection.
Other Solutions and Considerations
Most of the time you can get some additional affection from your canine by simply giving them some of the same. Play some games with your dog, show them affection when you can, and don't turn them away if they come up to you for the same kind of love. If you turn them away each time they approach you for affection, they will simply stop approaching you. Not because they do not like attention from you, simply because they do not think they can get it that way anymore.