It sounds like you are experiencing leg swelling that then experienced pitting. For example, lying on a crumpled sheet can leave an indent in the skin because it was swollen. Or even having your leg draped over the edge of your mattress where it is much firmer.
I have two questions first, to you suffer from edema or swellng in your legs at night, and may you have been laying against somthing that my have helped cause the indentation? I do know of people who do have edema in there lower legs and they will always keep their legs elevated on a footrest or box or whatever works. I hope that helped,