How old are you? If the pain goes away after you do aerobics
it probably isn't cardiac related. Seriously, true "heart pain" usually gets worse with exertion. Does it hurt more with certain positions or deep breaths or coughing? Have you had a fever? Does it hurt to touch the area? Could be you have muscular pain
and are working it out and then getting sore again. Maybe you are anxious and exercise and sleep are relieving the tension. Do visit your doctor if it persists.