All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Scholars disagree about whether it is possible to see Allaah The Exalted. According to As-Saffaareeni seeing Allaah The Almighty in a vision is possible according to the sounder opinion.
Shaykhul-Islam Ibn Taymiyyah mentioned that it is possible for a person to see and speak with his Lord in a vision, however it is not possible for this person to liken Allaah The Almighty to what he has seen in the vision, since images in visions do not necessarily resemble reality.
Nevertheless, if any person sees Allaah The Almighty in a vision this will reflect his beliefs about Him, that is: if his beliefs about Allaah The Almighty are correct, then the person will see and hear Him in a way that is fitting for Him, otherwise it will be the contrary.
Of course no reasonable person will deny that seeing Allaah The Almighty and speaking with Him in visions can happen and has happened to righteous people as well as to others. Indeed, man cannot control his visions. In fact, this issue is so famous that some Hanbali scholars mention it as one of religion's fundamentals. They also mention that some Mu‘tazilah and other sects deny the possibility of seeing Allaah The Almighty despite the fact that there are multiple reports about people who have seen their Lord in their sleep.
As mentioned, seeing Allaah The Almighty in a vision is a reflection of that person's beliefs about Him, therefore when the Prophet, sallallaahu ‘alayhi wa sallam , saw Allaah The Almighty in a vision he saw Him in the most befitting form.
With regards to the Hadeeth where the Prophet, sallallaahu ‘alayhi wa sallam, said that he saw Allaah The Almighty while he was sleeping, it is a Saheeh (Authentic) Hadeeth that was narrated by Imaam Ahmad and others.
As for whether Imaam Ahmad saw Allaah The Almighty in a vision, some scholars mention that this happened, but we found no authentic tradition narrated after him which indicated this.
Allaah Knows best.