Some students jumped from the hostel from as high as the fifth floor at the University of Nairobi campus after the pre-dawn explosion, vice-chancellor Peter Mbithi told AFP.
The country is on edge after the April 2 attack by Somalia's Shebab insurgents on Garissa university that killed 148 people, almost all of them students.
Education Minister Jacob Kaimenyi said today's explosion occurred at around 5:30 AM while students were sleeping on the university's Kikuyu campus about 20 kilometres (12 miles) west of the capital.
"Some students jumped out," and "there was also a stampede", said Mbithi. "One student died after jumping from the fifth floor."
More From This Section
About 150 were injured, mostly lightly, while 20 remain in hospital for treatment.
The attack in Garissa, a town near the border with Somalia, was the deadliest on Kenyan soil since the 1998 bombing of the US embassy in Nairobi and followed the 2013 Westgate shopping mall massacre in the capital.
"The way America changed after 9/11 is the way Kenya will change after Garissa," Vice President William Ruto said in a speech yesterday, according to an official statement.
Kenya has responded by asking the UN refugee agency to repatriate hundreds of thousands of Somali refugees by July, a move criticised by the UN refugee agency and rights groups.
"Instead of making refugees scapegoats, Kenya -- which is legally obliged to protect them until they can go home safely -- should find and prosecute those responsible for the Garissa massacre," said Leslie Lefkow, Human Rights Watch's Africa deputy director.