The risk of a woman having a heart attack while pregnant, giving birth or up to two months after delivery has risen 25 percent over 12 years, a study reveals.