What effect does sleep have in fitness?

MaxRocks
I'm trying to gain weight and muscle, although weight is more important (because if I have weight, I can convert it to muscle with some hard work, but it's much harder to create muscle before you put on some pounds).

The thing is, I suffer from occasional insomnia, which causes me to sleep 5 or 6 hours. I know 8 hours are optimal for muscle repair and recover, but assuming that I don't mind if muscle repair takes a little longer, do they also affect the weight I'm gaining? Will I stop gaining weight (or gain less weight) if I sleep less?
What effect does sleep have in fitness?
3 Opinion