If you're talking about one of the jumpseats in the flight deck (as opposed to the ones FAs use in the passenger cabin,) then, no, it's definitely not allowed during flight, at least not in the U.S. or E.U. It may be allowed elsewhere, though.
The United States
Relevant regulations for the U.S.: 14 CFR 121.547 for domestic air carriers and 14 CFR 129.28 for foreign ones.
The regs are a bit too long to quote here, but, to summarize: You're not getting into the flight deck during flight unless you have a valid, FAA-approved reason to be there. The mentioned exceptions were mostly FAA, NTSB, airline, or manufacturer employees and, even then, only ones with legitimate safety or operational reasons to be there. It is also mentioned that the PIC retains the emergency authority to deny access to even the FAA/NTSB/etc. personnel in the interest of safety.
Apart from all of the aforementioned categories of people allowed "a crewmember" is listed separately as being allowed, of course.
Also, there's 14 CFR 121.557(a) which says:
In an emergency situation that requires immediate decision and action the pilot in command may take any action that he considers necessary under the circumstances. In such a case he may deviate from prescribed operations procedures and methods, weather minimums, and this chapter, to the extent required in the interests of safety.
This exception allows the pilot of a Part 121 operation to deviate from any Federal Aviation Regulation when it is required in the interest of safety. So, the Pilot-in-Command may allow you to sit in the flight deck if he deems it's necessary for safe operation of the aircraft. As such, this exception allows other pilots to access the flight deck in the very rare instances where one of the pilots falls ill and the pilot-in-command decides to get another (non-airline) pilot who happens to be on board to sit in the right seat to help out for the remainder of the flight.
See Pondlife's excellent answer here for more information regarding emergency authority of the pilot-in-command.
The European Union (EASA)
This answer over at travel.SE also mentions that CAT.GEN.MPA.135 is the relevant EASA (E.U.) regulation preventing passenger access to the flight deck during flight.
As a notable exception, this answer here at aviation.SE does mention that South Africa allows licensed pilots to visit the flight deck during flight and that you might even get to ride in the jump seat.
Conclusion: I need to visit South Africa. :)
Other Related SE Questions