When a turtle is ill or injured, it will often sleep a lot. This is because their health will decline and it will be hard for them to move around and access food. If you are noticing that your turtle is sleeping a lot in its tank, then you should check its water temperature and look for signs of any physical damage.
Like all aquatic turtles, red eared sliders prefer to sleep underwater. While they are asleep they either sink to the bottom of the tank or float on its surface, using their inflated throats to help them stay afloat. They may resurface to breathe a couple times an hour but usually only for short periods of time.
During the day, they are active and can be found basking in the sun to regulate their body heat. They will leave the water to do so because they are cold-blooded and need to warm themselves in order to survive.
In the wild, they brumate at the bottom of ponds or lakes to protect themselves from the cold. During brumation, they can sleep for weeks to months, with their metabolism slowing down and their hearts beating less frequently.
The key to good sleep for any animal is to be well fed and hydrated. Make sure that your turtle has enough food and that it is eating its full serving size of each meal. It is also important to have a stable day and night cycle for your turtle so that it knows when to sleep. This can be done by creating a routine where the lights in its enclosure are turned on for 10 to 12 hours and then off for the same amount of time.