I read it somewhere, maybe as a Facebook photo of some Tumblr or yahoo a long time back (hence not a reliable source) that the user found it's pet snake (which was not eating food for quite some time) lying completely flat next to it on the bed one night and found it amusing and happened to ask the vet who said that it was measuring the user's height to see whether the user was suitable to eat or not. Can someone verify? It's creepy and I want to know the truth. (as I said, I don't remember the complete contents but just the context)
No, snakes don't do any kind of measuring their prey before attacking like that.
Typically they can see whether they can eat what they see. Similarly to how you don't have to bring out a tape measure to check whether something is bitesize.
It's actually not unheard of that snakes try to eat something that's too big for them to swallow, or to mistake an owner's hand for food, but this is just not how they respond to food.
I have a post here about body language in snakes, here you can also see how a snake responds to food. If they think something is food, you'll know it. They won't lie down beside it first to check.
Also think about it, would this strategy work in the wild? If I'm an antilope or something, and I see a snake doing that, I'm out of there. Snakes are mostly ambush predators. They lie in wait, waiting for food to come by. When it does there is no time for hesitation.