Do I need to take a morning after pill, if I got my period 24 hours after having unprotected sex?

You decide. Pregnancy has been documented from exposure at any point in a woman's cycle, including during menses. It is quite rare & more likely if cycles are irregular, but it can happen. There is no "safe" days if the outcome matters.