The Queen spent Wednesday night in hospital after cancelling her visit to Northern Ireland, Buckingham Palace has said.
A Palace spokesperson said the Queen went to hospital for "preliminary investigations" but returned to Windsor on Thursday.
The spokesperson said: "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."
It is understood the overnight stay was for practical reasons and the Queen was back at her desk on Thursday afternoon and was undertaking light duties.
The announcement came amid fears the Queen may be doing too much, with a packed diary of engagements since she returned from Balmoral at the beginning of October.
Since then, she has undertaken seven public events, including travelling to Cardiff, as well as her usual workload of audiences, investitures and dealing with daily red boxes.
On Tuesday night, she appeared to be on sparkling form at a Windsor Castle reception for business leaders and showed no sign of feeling unwell.
In a statement released at 11am on Wednesday, the palace said: "The Queen has reluctantly accepted medical advice to rest for the next few days.
"Her Majesty is in good spirits and is disappointed that she will no longer be able to visit Northern Ireland, where she had been due to undertake a series of engagements today and tomorrow.
"The Queen sends her warmest good wishes to the people of Northern Ireland, and looks forward to visiting in the future."
The decision to cancel was not related to Covid-19, a source confirmed, emphasising that there is no cause for concern about Her Majesty's general health.
At this stage, she is still expected to attend the Cop26 climate change conference in Glasgow at the end of the month.
The Queen has recently been undertaking a packed schedule, enjoying meeting the public again after a long coronavirus lockdown.
In the last few weeks, she has attended the opening of the Scottish Parliament and the Senedd in Cardiff, hosted business leaders at Windsor Castle, launched the Commonwealth Games baton relay at Buckingham Palace and joined a Westminster Abbey congregation to celebrate the 100th anniversary of the Royal British Legion.
She also met schoolchildren at Balmoral to plant a tree as part of a Platinum Jubilee project, held numerous video call and telephone audiences, and inspected the 1st Regiment Royal Canadian Horse Artillery at Windsor.
Despite appearing to be in full health in public, the Queen has recently made several small concessions to working at the age of 95.
At Westminster Abbey, she used a walking stick for comfort for the first time, being driven to a side entrance closer to her seat in order to spare a long walk.
She is also understood to have largely given up drinking to keep on top form.
On Tuesday, it emerged she turned down an Oldie of the Year Award, believing "you are only as old as you feel" and that she therefore did not meet "the relevant criteria".
Nevertheless, the Queen's admirers will hope she is able to scale back some of her more testing public duties over the winter, ahead of a busy 2022 of Platinum Jubilee celebrations.
Political leaders have shared their best wishes following the cancellation of her visit to Northern Ireland, where she was due to meet locals and schoolchildren in the newly-named village of Royal Hillsborough.
The Queen was also due to attend a church service in Armagh on Thursday, to mark the centenary of Northern Ireland's formation.
Brandon Lewis, Northern Ireland Secretary, said: "Wishing Her Majesty The Queen all the very best as she takes a few days' rest. I look forward to meeting her in Northern Ireland in the future."
Sir Jeffrey Donaldson, leader of the DUP, said: "We thank Her Majesty for her good wishes to the people of Northern Ireland and trust that she will keep well and benefit from a period of rest.
"It is always a joy to have Her Majesty in Royal Hillsborough and we look forward to a further visit in the near future."
The church service, organised by the four main churches in Northern Ireland, was the subject of controversy last month after Michael D Higgins, the president of Ireland, declined an invitation to attend, because he believed it was not politically neutral.