ספר המדות Conception; Pregnancy / Part I · ב
Sefer HaMiddot 896
ב. סְגֻלָּה לְהֵרָיוֹן – שֶׁתִּשָּׂא אֶצְלָהּ עֵץ קָטָן מִגַּג שֶׁעַל קֶבֶר הַצַּדִּיק אוֹ מַגְנֵט וְלִתֵּן צְדָקָה.
2. It is beneficial (segula) for a pregnancy -- that she carry on herself a small piece of wood from the roof over the grave of a tzaddik, or a magnet, and to give charity.