Successful ECG monitoring algorithms often rely on learned models to describe the heartbeats morphology. Unfortunately, when the heart rate increases the heartbeats get transformed, and a model that can properly describe the heartbeats of a specific user in resting conditions might not be appropriate for monitoring the same user during everyday activities. We model heartbeats by dictionaries yielding sparse representations and propose a novel domain-adaptation solution which transforms user-specific dictionaries according to the heart rate. In particular, we learn suitable linear transformations from a large dataset containing ECG tracings, and we show that these transformations can successfully adapt dictionaries when the heart rate changes. Remarkably, the same transformations can be used for multiple users and different sensing apparatus. We investigate the implications of our findings in ECG monitoring by wearable devices, and present an efficient implementation of an anomaly-detection algorithm leveraging such transformations.