Why do my joints and muscles from arthritis only when I lay down to sleep?

Inactivty. Joints need motion for lubrication. This is why people with arthritis have stiffness and aches during rest or sleep.
Need to know where. This depends on the diagnosis. This may not be arthritis. It can be muscles or soft tissue predominantly. A clear diagnosis is important to help identify and treat the process. When else does this occur? Does it occur when you sit? Does activity help the symptoms? Do see swelling? Where do the symptoms occur? This may be a clue that this is an inflammatory process.