Many people who touch the Ka’bah or the tomb of Prophet Ibrahim because they think will get a blessing because of it. Though this is not true and can be regarded as idolaters. Because the blessings only come from Allah SWT and the intercession only from Prophet Muhammad SAW through the practice of worship according to that has been exemplified by the Prophet Muhammad, not through the act of touching, kissing parts of the Ka’bah like stone Hajar Aswad and Rukun Yamani and mosques such as the Grand Mosque and the Nabawi Mosque. In the meantime, perhaps you should check the recommended hajj packages to get more convenience and better price for your travel.
In addition, there is no obligation that states should work on praying 40 rakats in the place. If you are able to do it, it’s okay, because the more worship you do Insha Allah will give you more reward if sincerely run it for Allah and according to the Shari’a. Even if there is a hadith that says that by performing a prayer 40 rakhaat in Nabawi Mosque will be free from the fire of hell, survived the torment and free from hypocrisy, this hadith is daif or weak. There is never a limit of how many days or hours, the pilgrims can stay in the mosque, but if only in a short time it can visit the Mosque of Nabawi, then pray as many rakaat that he can and had no nothing.