Not long after getting out of bed seems to work best for me. It gives me energy and a good focus for the morning. No more than 10 minutes is what I think though
It would be great if you can stretch multiple times a day but I suggest to start with the morning first. I do it right after I wake up and have had some water to drink. Depending on your preference, you can do a short breathing exercise before stretching or after. I stretch in the morning to wake my body up as I maybe sore from sleeping in the same or awkward positions. I also recommend stretching at your desk in the afternoon, and then stretching to relax right before bedtime as part of the sleep routine. The time will depend on you anywhere between a minute to ten depending on what your body is telling you. Start with a minute. And then if you have more soreness or stress during the day give yourself a little more time to recover. Stretching is the TLC your body needs after a long day.