Everyone's heart rate varies greatly throughout the day. The heart is a pump, and it automatically changes its rate to suit what the person is doing at any given time.
90-100 ppm while walking isn't unusual, and in the same way, 40 beats per minute during sleep is not rare. A fast drop to the 40s really soon after lying down is maybe a tad unusual, and you can certainly ask you PCP to explain more about that to you, but I don't read anything in your post that suggests any heart disease, or any need for an extensive workup.