In a method and a device for trending and prediction of monitored conditions or diseases, an REM sleep detector is provided to allow data collected during REM sleep to be separated from other data so stable and uniform conditions for data collection are achieved. The REM sleep detector can advantageously be provided inside an implantable medical device.