The Arabic word Istikhara is of the root “khayr = خير = goodness” and it means “asking for that which is good”. Allah the Almighty teaches us how to ask for His help:
“Oh, you who believe! Ask for help through patience and offering the prayer. God is with those who are patient.” (al-Baqarah 2:153)
So, whenever we need to decide on an important issue, we must ask God for His help to guide us to the right choice. We must do this by patiently offering the prayer (salat) and asking God for His guidance to show us the choice that which will be good for us.
The word translated as patience is “Sabr = صبر”. Sabr, as distinguished from “thabat“, means “showing fortitude in times of difficulty”. In this context, when a person intends to do something, he has to make effort to learn about the pros and cons of the probable choices, consult the people who might have knowledge or experience on this issue. No prayer can help a person unless he/she shows the necessary effort steadfastly.
Muhammad (a.s.) taught Muslims how to pray for the guidance of Allah in accordance with this verse and He said:
إذا همّ أحدكم بالأمر، فليركع ركعتين من غير الفريضة، ثم ليقل، اللهم إني أستخيرك بعلمك، وأستقدرك بقدرتك، وأسألك من فضلك العظيم؛ فإنك تقدر ولا أقدر وتعلم ولا أعلم، وأنت علام الغيوب. اللهم إن كنت تعلم أن هذا الأمر خير لي في ديني ومعاشي وعاقبة أمري” أو قال: ”عاجل أمري وآجله ، فاقدره لي ويسره لي، ثم بارك لي فيه، وإن كنت تعلم أن هذا الأمر شر لي في ديني ومعاشي وعاقبة أمري” أو قال: ”عاجل أمري وآجله، فاصرفه عني ، واصرفني عنه، واقدر لي الخير حيث كان، ثم ارضني به“ قال: ويسمي حاجته.
“When one of you contemplates entering upon an enterprise, let him perform two Rak’ah of optional prayer other than obligatory prayers and then supplicate: ‘O Allah, I consult You through Your Knowledge, and I seek strength through Your Power, and ask of Your Great Bounty; for You are Capable whereas I am not and, You know and I do not, and You are the Knower of unperceived things. O Allah, if You know that this matter (and name it) is good for me in respect of my religion, my life and the consequences of my affairs, (or he said, the sooner or the later of my affairs) then ordain it for me, make it easy for me, and bless it for me. But if You know this matter (and name it) to be bad for me in respect of my religion, my life or the consequences of my affairs, (or he said, the sooner or the later of my affairs) then turn it away from me, and turn me away from it, and grant me power to do good whatever it may be, and cause me to be contented with it.’ And let the supplicant specify the object.” (Bukhari, Da’wah/Invitation, 49; also Ibn Majah and Ahmad Ibn Hanbal)
So when you intend to do something, all that you can do is to follow this advice. It would be better if you wake up in midnight for praying, because Allah promotes night prayers in various verses (see. 73:6, 17:79, 3:17, 25:64, 32:16). When you ask something from Allah, you should always use your own words in your own language to show Allah your sincerity. Allah will ease for you the right choices in your life if you do it like this.
Practices about going to sleep and interpreting the dreams after the prayer of istikhara did not exist during the era of Messenger Muhammad (pbuh). They were made up later on. It is a widely known fact that dreams are not a valid source of information in Islam. Therefore, you should not make your decisions in accordance with dreams.