The Portugal international suffered a clash of heads with his own goalkeeper Iker Casillas in the draw against Valencia on Sunday evening.
The 29-year-old had to be replaced at half-time before being taken to hospital but has now been given the all-clear.
Team doctor Carlos Diez told the club’s official website: “Normally when there’s a head injury, we, as a matter of protocol, have the player under observation for 24 hours.
“We took him to hospital where he underwent the corresponding tests, which have come out negative.
“He has spent the night under observation and everything is fine and we’ve decided, under the control of the Real Madrid medical team, that the player can be discharged from hospital without any problem.”
It is unclear at this point whether Pepe will be fit to play for Real in Thursday night’s Spanish Supercopa first leg against Barcelona at the Nou Camp.