Why you shouldn't use NM cable
NM-B cable (Romex®) is not designed to be used as a flexible cord, and must be properly secured and supported. It's also not rated for use where it may be exposed to physical damage.
Flexible cords have thicker jackets, which are designed to hold up to a bit more abuse. They also contain stranded wires, which hold up to movement much better than solid core wire.
If you were to use NM-B cable in this way, there's a few potential problems.
The exposed bit of cable could be damaged, exposing the conductors. This could be a shock, and/or arc-fault hazard.
Repeated movement of the cable, could cause damage to the core of the wires. This damage could lead to increased resistance, which could be a fire hazard. Ultimately the movement could lead to the conductors breaking, which could pose an arc-fault hazard.
Instead you could go with a product like this Recessed Pro Power Kit w/Straight Blade Inlet. The inlet at the bottom of the wall, gives you a place to connect a power cord. The lower inlet is then connected to the upper outlet, using proper cable (e.g nonmetallic sheathed cable NM-B).
This is a much better, safer, and cleaner installation.
You'll also find that surge suppressor receptacles are available, though may not offer the same level of protection as a standalone device.
Products shown are for demonstration purposes only, I do not recommend or endorse these specific product.