A self-actuated headrest mechanism, which enables the user to easily adjust the headrest on which they lean their head according to the sizes of the user in passenger/driver seats of vehicles, comprising - at least one headrest shaft which forms the frame structure of the headrest, which is bent in reverse U form and the arms of which facing downwards extend vertical to the seat frame, and the arm of which closer to the seat frame is longer, - at least one metal tube two corresponding surfaces of which are open, which is in hollow box form, through the open surfaces of which the headrest shaft passes, and which is fixed to the seat frame through its surface closer to the seat frame, - at least one plastic tube which is in form of a hollow cylinder and through which the headrest shaft passes, and thus which serves as buffer between the metal tube and the headrest shaft by being placed inside the metal tube, and which is fixed to the metal tube, - at least one grasping cap which is fixed on the plastic tube and which contacts the edges of the open surface of the metal tube when the plastic tube is mounted to the metal tube, and which surrounds the headrest shaft extending inwards the plastic tube in form of a hollow ring, and characterized by - at least one pulling spring which is attached to the headrest shaft arm entering through the metal tube and going out of the other open surface of the metal tube from its one end, and which is attached to the outer surface of the metal tube from its other end, and wherein the metal tube can enter into the opening on its center, - at least one locking system which has at least one button that is positioned inside the grasping cap and extends outwards from the opening located on the grasping cap and on which the user can apply pressure; at least one protrusion that extends towards the headrest shaft from inside another opening located on the surface of the grasping cap facing the headrest shaft; at least one resilient element that is positioned between the inner surface of the grasping cap and the protrusion such that it will be fixed to the protrusion from its one end and that pushes the protrusion towards the headrest shaft unless the user applies pressure; and at least one transmitter that transmits the pressure applied on the button to the resilient element and on which the protrusion is located, - at least one dent which is positioned in alignment with the protrusion on the headrest shaft and wherein the protrusion enters upon the resilient element pushes the protrusion, and thus which allows the headrest to be kept in this position. - at least one headrest shaft which forms the frame structure of the headrest, which is bent in reverse U form and the arms of which facing downwards extend vertical to the seat frame, and the arm of which closer to the seat frame is longer, - at least one metal tube two corresponding surfaces of which are open, which is in hollow box form, through the open surfaces of which the headrest shaft passes, and which is fixed to the seat frame through its surface closer to the seat frame, - at least one plastic tube which is in form of a hollow cylinder and through which the headrest shaft passes, and thus which serves as buffer between the metal tube and the headrest shaft by being placed inside the metal tube, and which is fixed to the metal tube, - at least one grasping cap which is fixed on the plastic tube and which contacts the edges of the open surface of the metal tube when the plastic tube is mounted to the metal tube, and which surrounds the headrest shaft extending inwards the plastic tube in form of a hollow ring, and characterized by - at least one pulling spring which is attached to the headrest shaft arm entering through the metal tube and going out of the other open surface of the metal tube from its one end, and which is attached to the outer surface of the metal tube from its other end, and wherein the metal tube can enter into the opening on its center, - at least one locking system which has at least one button that is positioned inside the grasping cap and extends outwards from the opening located on the grasping cap and on which the user can apply pressure; at least one protrusion that extends towards the headrest shaft from inside another opening located on the surface of the grasping cap facing the headrest shaft; at least one resilient element that is positioned between the inner surface of the grasping cap and the protrusion such that it will be fixed to the protrusion from its one end and that pushes the protrusion towards the headrest shaft unless the user applies pressure; and at least one transmitter that transmits the pressure applied on the button to the resilient element and on which the protrusion is located, - at least one dent which is positioned in alignment with the protrusion on the headrest shaft and wherein the protrusion enters upon the resilient element pushes the protrusion, and thus which allows the headrest to be kept in this position.