The Queen will carry out light duties as she continues to rest following her Wednesday night stay in hospital for "preliminary investigations", it is understood.

The 95-year-old monarch, who was ordered to rest by doctors and advised to miss a trip to Northern Ireland this week, is staying at her Windsor Castle home and is said to remain in "good spirits".

Her short period at King Edward VII’s hospital in London was kept a secret by Buckingham Palace.

It is understood the Queen was due to stay for only a short period while seen by specialists, so the development was not announced by the Palace at the time, and protecting her medical privacy was also a consideration.

The overnight admittance was for "practical reasons", a source said.

The Queen’s trip by car rather than helicopter to the central London private hospital was confirmed by the Palace on Thursday evening only after The Sun newspaper broke the news.

A Buckingham Palace spokesman said late on Thursday night: "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 Queen’s admittance was her first overnight stay in hospital since she spent a night at the private clinic in 2013 when she was treated for the symptoms of gastroenteritis.

A statement released by Buckingham Palace on Wednesday at 11am, before the Queen was admitted to hospital that afternoon, announced the cancellation of her two-day visit to Northern Ireland.

It said: "The Queen has reluctantly accepted medical advice to rest for the next few days", before continuing to say she was "disappointed" at not being able to travel and sent her "warmest good wishes" to the people of Northern Ireland.

Royal author Penny Junor said the Palace’s decision not to announce the hospital visit prevented unfounded rumours from circulating.

She said: "I’m not surprised they did that, otherwise there would be speculation. People would be putting her in her grave long before she’s ready for it."

A Downing Street spokesman declined to say whether Mr Johnson had held his weekly audience with the monarch, but so far it has not been listed in the Court Circular, the official record of royal engagements.

The spokesman said: "The Prime Minister’s best wishes have been passed on to Her Majesty."

Today programme host Nick Robinson said: "It was only after The Sun's front page was published revealing that the Queen had spent a night in the hospital that the Palace confirmed Her Majesty had been admitted on Wednesday for preliminary investigations.

"One of the downsides of being the monarch is that the state of your health is a source of constant public attention.

"Do you think whether the Palace ever intended to tell us this?"

Mr Dymond responded: "I suspect the Palace did not, to be entirely honest."

He explained: "They jumped into it because of the impressive journalism from The Sun newspaper.

"There is a line between the privacy individuals can expect as to their medical status, and the expectations the country has of being informed about the health of the head of state, and someone who is held in such high regard by so many in this country.

"There will be a debate about whether the Palace got this right or wrong.

"But, I think it's pretty surprising that they were forced into admitting it.

"We are told she spent an evening in the hospital, the suggestion being that she went in for tests and it all started to get a bit late, so she stayed overnight in an impromptu manner

"The Queen is not in any medical danger."

The BBC royal correspondent added the Queen was still expected to attend the COP26 summit, and there was no plan to scale down her commitments as of yet.