Method, arrangement and computer program in a noise generator (100), for enhancing a cognitive function of a user (110). The method comprises estimating (201) attention level of the user (110), determining (202) an optimal cognitive performance level of the user (110), predicting (203) a noise amount and amplitude that is associated with the optimal cognitive performance level of the user (110), where this prediction is based on the estimated (201) attention level of the user (110), and emitting (204) noise having the predicted (203) noise amount and amplitude, to be received by the user (110).