Pupils in Silsden raised about £250 to help improve facilities for youngsters in hospital.
Children at Hothfield Junior School donated money in return for going to school in pyjamas, onesies and dressing gowns.
The money will be given to Bradford Hospitals’ Children’s Charity.
Hothfield head teacher James Procter said the school’s council raised money for a different good cause every half term but said Friday’s pyjama day was also part of the school’s drive to promote reading for enjoyment.
“We had bedtime stories read to the children,” he said. “The pupils were very excited to be dressed for bedtime during the day but most of all this was about encouraging them to read for pleasure, because we know that children who read more learn more.”