Sounds like initially you didn't have enough light for the germinating seedling and it stretched. Now it is leaning to the side because the elongated stem cannot support the weight. Brace it up with a small wooden stake and a twist tie.