Electrically adjustable bed mechanism with advancedneck-support for slatted bed frames and upholstered beds