A medical device detects certain patient activity based on a programmable activity threshold and determines the duration of detected activity. The activity threshold may be optimized by obtaining first and second duration measurements for at least one of a first activity session and second activity session. The first duration measurement is based on the activity threshold, while the second duration measurement is based on actual start and stop of the activity session. An adjustment of the activity threshold is suggested based on a correspondence between the first duration measurement and the second duration measurement of the first activity session, or a correspondence between the first duration measurement and the second duration measurement of the second activity session. One of the first and second activities is non-significant activity expected to be undetected by the device, while the other of the two activities is low-level activity expected to be detected by the device.