Britain's Queen Elizabeth spent last night in hospital for what Buckingham Palace described as "preliminary investigations" but she returned to Windsor Castle today and is in good spirits.

The 95-year-old cancelled an official trip to Northern Ireland yesterday after she was told to rest by her medical staff, and that her condition was not related to Covid-19.

"Following medical advice to rest for a few days, the queen attended hospital on Wednesday afternoon for some preliminary investigations, returning to Windsor Castle at lunchtime today, and remains in good spirits," the palace said in a statement.

A royal source said she had stayed in hospital for practical reasons and that her medical team had taken a cautious approach.

Elizabeth - the world's oldest and longest-reigning monarch - returned to her desk for work this afternoon and was undertaking some light duties, the source said.

She spent Tuesday night hosting a drinks reception at Windsor Castle for billionaire business leaders such as Bill Gates after British Prime Minister Boris Johnson convened a green investment conference ahead of the COP26 climate summit in Glasgow.

Queen Elizabeth at Windsor on Tuesday night

She had appeared in good health then, smiling as she met the guests.

The head of state, who next year celebrates 70 years on the throne, is known for her robust health and the last time she is thought to have spent a night in hospital was in 2013 when she was suffering from symptoms of gastroenteritis.

She had a successful surgery to treat an eye cataract in 2018 and also had a knee operation in 2003.

Earlier this year, Prince Philip, her 99-year-old husband of more than seven decades, died at Windsor Castle.

But that has not stopped her from carrying out her official engagements, although her age has meant she has handed more duties to her son and heir Prince Charles and other members of the royal family.

Earlier this month, she was seen using a walking stick for support in public for the first time, apart from after her knee operation, when she arrived for a service at London's Westminster Abbey.