The mat would consist of three layers:
A top layer, made of rubberized cloth (to prevent the layer below from being punctured)
A middle layer, made of cells of a springy, flexible, but inelastic, plastic (so they can change shape, and spring back to their original shape, but not stretch out), filled
with hydraulic fluid.
A bottom layer, with two check valves for each cell... one to let fluid in, and another to let fluid out. Also, two manifolds, one to distribute low pressure hydraulic fluid to the cells, and one to collect high pressure hydraulic fluid from cells.
When a person steps onto the mat, his weight squishes the cells beneath his feet, sending the hydraulic fluid within out the check valves, to the high pressure manifold.
From there, it goes through a small hydraulic motor (which sits in one corner of the mat), which spins a small electric generator, then to the low pressure manifold, and then back to the cells.
There's enough slack in the system so that when a person with average sized feet puts one foot onto the mat, his foot will (after a few moments of fluid being squished out by his weight) eventually totally squish the cells below it flat. When he shifts his weight to his other foot, the flattened cells get re-inflated.
Optionally, a small hydraulic reservoir (on the low pressure side of the system) can ensure that if one steps entirely off the mat, any depressions get re-inflated.